Skip to content

Instantly share code, notes, and snippets.

@thor27
Created September 12, 2026 04:23
Show Gist options
  • Select an option

  • Save thor27/640c659e37606d0171d0776810ecc9ff to your computer and use it in GitHub Desktop.

Select an option

Save thor27/640c659e37606d0171d0776810ecc9ff to your computer and use it in GitHub Desktop.
Keychron Q3 HE 8K udev rules (Full xbox controller compatibility)
# 1. Device Permissions (WebHID / Keychron Launcher)
SUBSYSTEMS=="usb", ATTRS{idVendor}=="3434", MODE="0666", TAG+="uaccess"
KERNEL=="hidraw*", ATTRS{idVendor}=="3434", MODE="0666", TAG+="uaccess"
# 2. Block the keyboard, mouse, and system interfaces from acting like a joystick
KERNEL=="event*", SUBSYSTEM=="input", ATTRS{idVendor}=="3434", ATTRS{name}=="*Keyboard*", ENV{ID_INPUT_JOYSTICK}=""
KERNEL=="event*", SUBSYSTEM=="input", ATTRS{idVendor}=="3434", ATTRS{name}=="*Mouse*", ENV{ID_INPUT_JOYSTICK}=""
KERNEL=="event*", SUBSYSTEM=="input", ATTRS{idVendor}=="3434", ATTRS{name}=="*System Control*", ENV{ID_INPUT_JOYSTICK}=""
KERNEL=="event*", SUBSYSTEM=="input", ATTRS{idVendor}=="3434", ATTRS{name}=="*Consumer Control*", ENV{ID_INPUT_JOYSTICK}=""
# 3. Force the Xbox mode interface to use the official Linux Xbox Controller driver (xpad)
SUBSYSTEM=="usb", ATTR{idVendor}=="3434", ATTR{idProduct}=="1030", RUN+="/sbin/modprobe xpad"
SUBSYSTEM=="usb", ATTR{idVendor}=="3434", ATTR{idProduct}=="1030", RUN+="/bin/sh -c 'echo 3434 1030 > /sys/bus/usb/drivers/xpad/new_id'"
# 4. Standard Gamepad Mode (fallback if you use standard generic gamepad instead of Xbox)
SUBSYSTEM=="input", ATTRS{idVendor}=="3434", ATTRS{name}=="*Gamepad*", ENV{ID_INPUT_JOYSTICK}="1"
@thor27

thor27 commented Sep 12, 2026

Copy link
Copy Markdown
Author

Not only the xbox mode works with more games, it also support both analog trigger as independent axis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment