Skip to content

[Feature Request] Option to disable gamepad HID interface when not in Gamepad Mode (Linux) #512

Description

@RaulKong89

Description

All Keychron HE keyboards (J2 HE 8K, K8 HE, Q1 HE, Q3 HE, Q5 HE, etc.) always expose a joystick/gamepad HID interface on USB, regardless of which HE profile is active. This causes games on Linux to detect a phantom controller even when the keyboard is in Default or Gaming mode.

Problem

  • The USB device always includes a joystick interface (vendor 3434, product varies by model)
  • Linux kernel creates /dev/input/js0 and sets ID_INPUT_JOYSTICK=1 on the event device
  • Games (Steam, GOG, standalone, Wine/Proton) show 'controller connected' prompts, take over input as gamepad, and ignore mouse/keyboard in menus
  • The only workaround is a udev rule that hides the joystick interface entirely (Hezkore gist)
  • This udev rule also hides the joystick when the user switches to Gamepad Mode (fn+P+C), defeating the purpose

Request

Add an option in Keychron Launcher or firmware to completely disable the gamepad/joystick HID interface when the keyboard is not in Gamepad Mode. Possible approaches:

  1. Firmware-level: When no Gamepad Analog mappings are configured on the active HE profile, don't expose the joystick HID interface at all
  2. Launcher-level: A 'No Gamepad' toggle similar to what Wooting offers in Wootility, which disables the gamepad HID descriptor entirely
  3. Different USB product IDs: Use a different product ID when Gamepad Mode is active vs inactive, so udev rules can distinguish them

Workaround (current)

Users must create a udev rule to hide the joystick:

SUBSYSTEM=="input", KERNELS=="*:3434:*", ENV{ID_INPUT_JOYSTICK}=="?*", ENV{ID_INPUT_JOYSTICK}=""
SUBSYSTEM=="input", KERNELS=="*:3434:*", KERNEL=="js[0-9]*", RUN+="/bin/rm %E{DEVNAME}"

This works but also prevents Gamepad Mode from being detected by games.

Environment

  • Keyboard: Keychron J2 HE 8K (wired, USB-C)
  • OS: Linux (Arch/CachyOS, kernel 7.x, GNOME 50)
  • Firmware: Stock Keychron (latest)
  • Also reported on: K8 HE, Q1 HE, Q3 HE on various Linux distros

Related

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions