| Summary: | SDL Events not triggered for KeyDown/KeyUp for F-keys, when using 2nd keyboard | ||
|---|---|---|---|
| Product: | SDL | Reporter: | midwan |
| Component: | events | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED INVALID | QA Contact: | Sam Lantinga <slouken> |
| Severity: | major | ||
| Priority: | P2 | ||
| Version: | 2.0.14 | ||
| Hardware: | ARM | ||
| OS: | Linux | ||
|
Description
midwan
2021-01-27 17:37:12 UTC
I did some more tests, and I'd like to offer some more context on this case: It appears the problem is not exactly as I originally thought. It's not about having a 2nd keyboard, but the specific keyboard I was testing with. I tried with a few other keyboards and the events were triggered correctly, and I tried the same keyboard on another device (RockPro64) also using Manjaro Linux, and the same problem occurred there. Which means that for some reason, SDL2 does not trigger the F1-F12 events when using this specific keyboard (it's a Keychron K3: https://www.keychron.com/pages/keychron-k3-wireless-mechanical-keyboard). Remember it still works normally on the Linux desktop (e.g. you can press F5 and it will refresh the webbrowser). While testing, I also discovered something that is interesting and perhaps helps: When pressing the F3 and F4 keys, SDL printed out that "The key you just pressed is not recognized by SDL". Specifically, this is the message for the F3 key: The key you just pressed is not recognized by SDL. To help get this fixed, please report this to the SDL forums/mailing list <https://discourse.libsdl.org/> X11 KeyCode 128 (120), X11 KeySym 0x1008FF4A (XF86LaunchA). And this is the message for the F4 key: The key you just pressed is not recognized by SDL. To help get this fixed, please report this to the SDL forums/mailing list <https://discourse.libsdl.org/> X11 KeyCode 212 (204), X11 KeySym 0x1008FF4B (XF86LaunchB). No other F-keys trigger any kind of response in SDL2. Is there anything else you'd like me to do, in order to assist further? A bit more context, sorry. If I use SDL2 under KMSDRM using the console, instead of X11, I get different keyboard events triggered with the same keyboard. Instead of the F-keys, I get the "special" actions (e.g. VolumeUp, VolumeDown, etc), which are normally triggered in combination with the Fn key. The keyboard has a firmware toggle to use normal F-Keys or the special actions, and although that works normally under Windows, it doesn't seem to change it under Linux. At this point, I'm not sure this is an SDL2 problem even, I'll reach out to the keyboard manufacturer for some feedback and see. Sorry for spamming. :) I managed to find a workaround on Linux, by switching the keyboard to iOS/Mac mode - that made it show the F-keys when using the Fn key, under SDL2 as well. We can close this bug report. |