04-21-2022, 09:25 AM
(04-21-2022, 05:06 AM)mr_growl Wrote: Had a look at Megi's development log and it says exactly what's happened
Quote:2022–04–12: Pinephone keyboard keymaps
I've merged latest keyboard driver from Samuel to my 5.17 and 5.18 kernel branches. That driver has function keys F1-F10 mapped to Fn+1-Fn+0. There's no way to type alternate symbols printed on those keys, without loading a keymap into a kernel.
For use with Linux kernel virtual console, you can load the following keymap via
:Code:loadkeys -d ppkb.map
strings as usual
compose as usual for "iso-8859-1"
keymaps 0-63
plain keycode 125 = ShiftR
ShiftR keycode 125 = ShiftR
ShiftR keycode 0x02 = bar
ShiftR keycode 0x03 = backslash
ShiftR keycode 0x06 = asciitilde
ShiftR keycode 0x07 = grave
ShiftR keycode 0x08 = minus
ShiftR keycode 0x09 = equal
ShiftR keycode 0x0a = underscore
ShiftR keycode 0x0b = plus
Afterwards you'll be able to type Pine+1 to type |, Pine+2 to type \, and so on. Of course you are not limited to this simple keymap, you can read
, and implement any kind of key mapping you want. You can override arrow keys to make them active by default, you can make use of AltG or Pine key for more things, etc.Code:man keymaps
You can create similar keymaps for XKB, for use with Xorg server or wayland compositors.
You should not be modifying keymaps inside the kernel or device tree.
I had actually tried that last weekend and then completely forgot about it. I still think it would be nice to get the userspace driver going, just to see what it does vs the kernel driver.
Sorry for the delayed response. I tried using the loadkeys command but it didn't work. Something like "Couldn't get file descriptor referring to the console". Did you get it to work? If so, would you mind explaining how? I think personally I would rather use the function key instead of the PINE64 key just because I already had keybinding in Emacs for the PINE64 key.