https://github.com/mscherer/joycon2click
Linux software to convert Joycon to presentation clicker
https://github.com/mscherer/joycon2click
joycon rust
Last synced: over 1 year ago
JSON representation
Linux software to convert Joycon to presentation clicker
- Host: GitHub
- URL: https://github.com/mscherer/joycon2click
- Owner: mscherer
- License: mit
- Created: 2022-11-19T09:26:05.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-17T14:48:33.000Z (over 1 year ago)
- Last Synced: 2025-03-17T15:43:07.856Z (over 1 year ago)
- Topics: joycon, rust
- Language: Rust
- Homepage:
- Size: 81.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
A quickly written software to convert button push on a Joycon (Nintendo Switch
controller) to a regular keypress in order to pass on the next slide on Libreoffice.
# Usage
Build with `cargo build -r`, run `target/release/joycon2click`.
Run Libreoffice (or anything using left and right) in full screen.
Once the Joycon is connected, the triggers (L, R, ZL, ZR) and buttons on the right (right arrow on the Dpad for left Joycon, A for the right Joycon) will
go to the next slide, and Y and Left arrow will go back to the previous slide by pushing Left and Right.
# Bugs
## Uinput and root account
The system requires write access to /dev/uinput, which requires root access.
The easiest is to use `chmod o+rw /dev/uinput`, but this is a blunt fix.
A more restricted fix would be: `setfacl -m u:$(id -un):rw /dev/uinput`, which restrict uinput
to the current user.
Be aware that opening uinput this way mean that any software can start injecting key press. For example,
a malware could type commands when you are using a terminal, etc.
A last potential fix is to start the software as root and use the option `-u someuser` to switch to a unprivilged user after /dev/uinput is opened. Make sure to switch to either the user on the console, or a user in the `input` group.
## Multiple joycon support
Only 1 joycon is supported (usually, the 1st one attached, but no garantee on that). Multiple joycons support is out of scope.
## Do not detect joycon disconnection
If the joycon is disconnected, nothing happen. If it reconnect, the software will stop, unless if `-b` is given on the commandline.
# Alternatives
A few people have wrote softwares similar to that one, I list them here for reference:
* https://github.com/HonbraDev/joyclicker-rs