Newer Keychron keyboards feature Xbox controller emulation to leverage magnetic Hall Effect switches, allowing the keyboard to be used as an analog joystick input.
I added the USB ID to xpad, but that didn't seem to work completely: while analog input was supported, button presses were sometimes not registered or remained stuck (the key registered as pressed even after being released).
After some debugging (with Gemini's help), I was able to get it working by changing XPAD_PKT_LEN to 32.
I have opened a pull request with a possible fix and added support for the Keychron keyboard:
#373
I'm also open to alternative approaches, such as adding a quirk flag like FORCE_32_PKT exclusively for the Keychron keyboard. However, since 32 was used for most of the driver's history (and most controllers were introduced with that size) there is a good chance that if this device broke, others might have broken as well.
Newer Keychron keyboards feature Xbox controller emulation to leverage magnetic Hall Effect switches, allowing the keyboard to be used as an analog joystick input.
I added the USB ID to xpad, but that didn't seem to work completely: while analog input was supported, button presses were sometimes not registered or remained stuck (the key registered as pressed even after being released).
After some debugging (with Gemini's help), I was able to get it working by changing
XPAD_PKT_LENto 32.I have opened a pull request with a possible fix and added support for the Keychron keyboard:
#373
I'm also open to alternative approaches, such as adding a quirk flag like
FORCE_32_PKTexclusively for the Keychron keyboard. However, since 32 was used for most of the driver's history (and most controllers were introduced with that size) there is a good chance that if this device broke, others might have broken as well.