Hacker News new | ask | show | jobs
by deepthaw 3 days ago
It took me three hours to figure out how to blacklist my Keychron keyboard from showing up as a joystick - and screwing up several games that thought they were receiving constant joystick input - in Linux, so I'm not sure how keen I am on using their stuff in the future. Is that a common issue in Linux?
3 comments

Oh cool, someone talking about the really weird bug that I've never seen reported elsewhere. Seems like an issue where certain versions of Unity (to name one engine) doesn't like it when your actual game controller is the second joystick it detects. Not really Keychron's fault or Linux's fault, just a weird engine quirk.

Anyway, if someone finds this by searching, at least on Arch it's as simple as adding a custom hwdb entry at /etc/udev/hwdb.d/61-input-id-local.hwdb:

  id-input:modalias:input:b0003v3434p0283*
   ID_INPUT_JOYSTICK=
and then run systemd-hwdb update.

The modalias value is found at /sys/class/input/<yourdevice>/device/modalias

I can at least say that it's not endemic.

I have two different Keychron keyboards, used in different Linux distros. I have never experienced, and wouldn't even had imagined, such a scenario.

I can imagine it very easily, depending on the keyboard.

For example: The Keychron C3 HE I'm typing this on (which I ranted elsehere about lacking the open-source/QMK firmware it is advertised to have) has some peculiar features that it supports. The way they used Hall effect keyswitches lets some fun stuff happen.

That fun stuff includes 3 different modes: One is just a keyboard, and the other two modes let the keyboard behave exactly like a game controller. At least one of those game controller modes even lets keys behave as analog inputs.

I haven't knowingly used this keyboard in game controller mode, but perhaps it is something can be selected by software (in addition to the multi-key combo listed in the book).

> At least one of those game controller modes even lets keys behave as analog inputs.

Now that's a really cool feature I never thought of when considering a Hall-effect keyboard. I knew you could adjust the activation position of each key on some, but analog would be great for games.

It's a pretty neat keyboard and I'm glad that I chose it.

And while I know some of how the Hall effect works, I didn't research how that relates to keyswitches at all before buying it. In terms of use, I just knew that they weren't clicky[1] and that they didn't rely upon electrical contacts that can corrode. It was risky in this way, but I was buying under duress since at the time I needed a new keyboard approximately yesterday.

Having the ability to shift this thing into a bunch of analog inputs was a complete and total surprise. I hope to be able to come up with something unique to do with the this function some day.

[1]: It turns out that my typing style didn't depend upon clicky at all. My hands, forearms, and wrists feel the same as they always have, and my typing speed still tops out at an accurate ~100WPM at times when that's useful. There was no adjustment period, which was a bit of a surprise.

Probably depends on the specific device and specific game. I ended up using some info from here.

https://github.com/denilsonsa/udev-joystick-blacklist

I think this has to do with their 2.4G dongle for their wireless keyboards - it shows up as a DirectInput (but not XInput) controller for me on Windows for whatever reason. The keyboard itself doesn't though.
No? I run Fedora and have a few keyboards from them and have not seen that. 1x K1SE and 2x K8 Pros for reference.