this post was submitted on 25 Apr 2026
70 points (98.6% liked)

Linux

64839 readers
1024 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 7 years ago
MODERATORS
 

A friend and I wanted to use a Wiimote as a PC remote for movie night. We have tried various existing software, but all had some issues: some were old Xorg-only programs, some didn't have proper IR tracking, and all were abandoned by the developer. But most of all, no software (even modern remappers like InputPlumber) had any support for key combos. So, we set out to write our own.

Some of our requirements were:

  • Key combos (the wiimote has only few buttons)
  • Proper IR tracking
  • The ability to enable or disable the IR with a key combo
  • Having no observable latency

We first developed "esperto" a powerful system for describing and detecting key combos, which we implemented in this library. It is generic so it can be used on pretty much anything that needs combo detection. At first, we intended to plug that into InputPlumber, but then decided it would be easier to do everything ourselves.

So, we ported this IR tracking algorithm from Hector Martin to rust, and put it together with our esperto library, and this is the result. It is extremely fast (mostly dominated by the actual latency of evdev's and uinput's UAPI), and it meets all of our requirements. And we already have ideas for future improvements, for example how to add support for wiimote extensions.

top 8 comments
sorted by: hot top controversial new old
[–] rastacalavera@lemmy.world 8 points 13 hours ago (2 children)

Interesting! How do you get the Wii bar to connect to a pc?

[–] edinbruh@feddit.it 8 points 12 hours ago* (last edited 12 hours ago)

You can buy an usb-powered one for a couple euros from AliExpress, or you can hook 5V to an original bar. But the bar itself is just two Infrared lights, there's plenty of substitutes (i.e. literally two candles 20cm apart).

P.s. do not leave the bar permanently on, you will burn out the LEDs. The Wii turns it off with the console

P.p.s. you can configure esperto-wiimote to run a command when you connect the First wiimote, and disconnect the last. It's meant for turning on and off the bar, if you can do it programmatically

[–] SatansMaggotyCumFart@piefed.world 3 points 13 hours ago* (last edited 13 hours ago)

When my IR bar broke I just used two candles as a replacement.

[–] morgenman@lemmy.world 3 points 12 hours ago (1 children)

In the future you might consider picking up a dolphin bar. It handles all the Bluetooth stuff and has four modes, one of which is a mouse mode with motion controls and one of which is using the nunchuck. Still, very cool!

[–] edinbruh@feddit.it 1 points 5 hours ago

From what I see, the dolphin bar requires walking up to it to change mode. We want to enable and disable the IR by holding a button, and other combos in general. Also, I don't know if the dolphin bar still lacks pointer smoothing, but we have it, and it's even configurable

[–] bright_side_@piefed.world 4 points 13 hours ago (1 children)
[–] edinbruh@feddit.it 2 points 12 hours ago
[–] moonshadow@slrpnk.net 2 points 13 hours ago

Pretty handy, thanks :)