Use Joy-Con or Pro Controller as remote control of Linux machine.
Project description
Joymote
Use a Joy-Con or Pro Controller as a remote control of your Linux machine.
Joy-Con and Pro Controller can be connected to Linux machine via Bluetooth. Joymote listens for button presses and analog stick movements, then translates them into keyboard input, mouse movement, or custom commands defined by you. With Joymote, your game controller becomes a powerful input device for controlling your desktop.
Requirements
- Python
- uinput module
-
Check whether the
uinputmodule is loaded, by running:lsmod | grep uinput
If it is loaded, you will see a line like
uinput 20480 0. -
You can manually load the module by running:
sudo modprobe uinput
-
You can also run the following command to load
uinputmodules automatically on boot.sudo bash -c "cat uinput > /etc/modules-load.d/uinput.conf"
-
Make sure you have the permission to access
/dev/uinput.
-
Installation
Using pip
pip install joymote
From source
git clone https://github.com/kkoyung/joymote.git joymote
cd joymote
# check out different version by tags, if you want
pip install .
Usage
-
Copy the example configuration file to
~/.config/joymote/config.toml.wget -o ~/.config/joymote/config.toml https://raw.githubusercontent.com/kkoyung/joymote/refs/heads/main/config.toml
-
Start
joymote.joymote
-
By default, Joymote does nothing. Check out
config.tomland change it to configure Joymote's behaviours upon pressing buttons on the controller.
Joymote can detect newly connected controllers without restarting, so you can run it as daemon in the background. For example, run it as a systemd unit.
Connect controllers via Bluetooth
The controllers can connect to your Linux machine via Bluetooth, just like usual Bluetooth devices.
- Press and hold down the SYNC button (the tiny button between SL and SR on Joy-Con, or the tiny button between L and R button on Pro Controller) for at least one second to enter pairing mode.
- Enable Bluetooth of your computer, and scan new devices.
- Find a device named "Joy-Con (L)", "Joy-Con (R)", or "Pro Controller". Pair and connect to it.
Development
-
Clone the repository.
git clone https://github.com/kkoyung/joymote.git joymote cd joymote
-
Run the code.
uv run joymote # or python -m venv .venv source .venv/bin/activate python install . python -m joymote
Pairing two Joy-Con as one device (Optional)
Use joycond, which is a userspace daemon, to combine Joy-Cons into a single device.
-
Install and start. For example, if you are on Arch Linux, you can run
yay -S joycond-git sudo systemctl enable --now joycond
-
Then, follow this instruction to pair the controller.
Disclaimer
Nintendo®, Nintendo Switch®, Joy-Con®, and Pro Controller® are registered trademarks of Nintendo of America Inc. This project is an independent work and is not affiliated with, endorsed by, or sponsored by Nintendo. All trademarks are the property of their respective owners.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file joymote-0.0.4.tar.gz.
File metadata
- Download URL: joymote-0.0.4.tar.gz
- Upload date:
- Size: 11.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4a1c8f7ca1878471c1413051cf24ec99ef4e3f57e32d3b885317262877463d0
|
|
| MD5 |
d71dd7ca8f162e5a223a9aee4ed4077e
|
|
| BLAKE2b-256 |
29cfe9c8deb9266f70e1772f14744cabb5f18ee139c0fb38852800632efbe887
|
Provenance
The following attestation bundles were made for joymote-0.0.4.tar.gz:
Publisher:
build-deploy.yaml on kkoyung/joymote
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
joymote-0.0.4.tar.gz -
Subject digest:
e4a1c8f7ca1878471c1413051cf24ec99ef4e3f57e32d3b885317262877463d0 - Sigstore transparency entry: 262476948
- Sigstore integration time:
-
Permalink:
kkoyung/joymote@12dc5fc01bd06bc787be626b5c32472eff9f146a -
Branch / Tag:
refs/tags/v0.0.4 - Owner: https://github.com/kkoyung
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-deploy.yaml@12dc5fc01bd06bc787be626b5c32472eff9f146a -
Trigger Event:
push
-
Statement type:
File details
Details for the file joymote-0.0.4-py3-none-any.whl.
File metadata
- Download URL: joymote-0.0.4-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7742d23e13fd40d50e0d5179835456e9525f783432c653b2a7b4f038cdd5015
|
|
| MD5 |
a99a8fb1a501c422767a7f7eb58e51f9
|
|
| BLAKE2b-256 |
697df4c89b31a75ed24aa1faaa841992adab17b6a35c6ea99e0828f7dd9f4157
|
Provenance
The following attestation bundles were made for joymote-0.0.4-py3-none-any.whl:
Publisher:
build-deploy.yaml on kkoyung/joymote
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
joymote-0.0.4-py3-none-any.whl -
Subject digest:
a7742d23e13fd40d50e0d5179835456e9525f783432c653b2a7b4f038cdd5015 - Sigstore transparency entry: 262476951
- Sigstore integration time:
-
Permalink:
kkoyung/joymote@12dc5fc01bd06bc787be626b5c32472eff9f146a -
Branch / Tag:
refs/tags/v0.0.4 - Owner: https://github.com/kkoyung
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-deploy.yaml@12dc5fc01bd06bc787be626b5c32472eff9f146a -
Trigger Event:
push
-
Statement type: