I have a Raspberry Pi 400, with 2021-11-2 Software installled. I’l like to be able to power down my Pi400 (running OSMC+Kodi) using the Pi 400 keyboard Fn + F10 keys. This would be equivalent to selecting ‘Power/Power off system’ from the main menu using the OSMC remote (which does work).
There doesn’t seem to be an obvious way of configuring this.
I should add that it is possible to power up the Pi 400 (& therefore Kodi + OSMC) using Fn + F10 on the keyboard, so it would be great to have this as a power toggle capability.
Any help gratefully appreciated.
I’m not sure how it’s implemented in Raspberry Pi OS.
Have you tried the Keymap Editor? Isn’t FN + F10 recognized there?
I don’t think the “FN” key is normally the same as keys like shift, ctrl, and alt. I believe the way they typically work is at the hardware level such that the OS doesn’t see something like FN + F10 but rather whatever key was sitting under that combination. My guess in your case this would likely be a key Kodi would pickup as “power”. You might try a keymap like this to see if it gets you where you want to go…
If that isn’t it, and keymap editor isn’t giving up a key id when you try to map it that way, then the next thing to try is to turn on debug logging and see what gets recorded as the handlekey event/s when you press that button combination.
Thank you @darwindesign & @fzinken, simply adding the suggested XML -
into a file with the path/name
\home\osmc\.kodi\userdata\keymaps\shutdown.xml worked a treat, I didn’t even need to use the Keymap Editor add-on or monitor the key strokes.
Correct, actually FN-Keys generate ACPI events not Keyboard Events