Which Linux distro are you using? Pop!_OS
Which release version? 24.04
(if rolling release without a release version, skip this question)
(If rolling release, last date updated?)
Which kernel are you using? 6.17.9-76061709-generic
Which BIOS version are you using? 4.02
Which Framework Laptop 16 model are you using? (AMD Ryzen™ 7040 Series) AMD Ryzen 9 7940HS
I have a python app that uses a couple python libraries to detect key presses. Both methods stopped working, possibly after I upgraded the keyboard firmware to 0.3.1 as instructed when I upgraded the BIOS a month or two ago.
I figured out the cause. The keyboard device was /dev/input/event7 before the upgrade, and now it’s /dev/input/event9. I’d like to know if there is a deterministic way to set this, or is it randomly chosen after a firmware upgrade? My software is made available to other Framework 16 users (it provides LED matrix control), so I’d like to be able to explain how to change the device location in the code if necessary.
Here is how I determined the loccation to use:
$ libinput list-devices | grep -A 2 Keyboard
Device: Framework Laptop 16 Keyboard Module - ANSI
Kernel: /dev/input/event5
Group: 4
--
Device: Framework Laptop 16 Keyboard Module - ANSI System Control
Kernel: /dev/input/event6
Group: 4
--
Device: Framework Laptop 16 Keyboard Module - ANSI Consumer Control
Kernel: /dev/input/event7
Group: 4
--
Device: Framework Laptop 16 Keyboard Module - ANSI Wireless Radio Control
Kernel: /dev/input/event8
Group: 4
--
Device: Framework Laptop 16 Keyboard Module - ANSI Keyboard
Kernel: /dev/input/event9
Group: 4
I don’t know why there are so many Keyboard entries, but the last one is the correct one for me. I have a USA ANSI keyboard.
So I’m wondering:
Is the assignment of a keyboard device random? Does it change after a keyboard firmware upgrade? Will the value change depending on the keyboard that’s in use?