again it's me dealing with Apple Keyboards... I got the latest [1], which unfortunately lacks an Insert key (yes, I could type 'i' instead of hitting Intert inside vim, but I'd like to get my Ins key back... you know...)
till today I used keyfuzz to remap KEY_F13 to the (missing since ever!) KEY_SYSRQ, this way: echo "0x00070068 99" | keyfuzz -s -d/dev/input/event1 today I spent hours on trying to understand how the above worked. what I learned today is: * usage code is split into PAGE and the CODE itself... so, I see my usage code is 0x68 of page 7 (but I didn't find in the hid code where/what are those pages) * usage code is mapped thru the hid_keyboard[256] array at drivers/hid/hid-input.c:44 so I believed now I know how to find more usage codes, but... surprise! KEY_FN which is 0x1d0 (464) doesn't fit at all into that table now here I don't really understand how things work (and this is not a powerbook!). do you think it is possible to remap that FN key to the more appropriate (at least for its location*) INS key [with keyfuzz]? can you give me the usage code? please, more generally, teach me how to find those usages in such situations.. I would really appreciate! *: would otherwise be reasonable to fix this stuff in hid-input or whatever, hard-replacing that key? a FN key which does not act like a modifier** is totally useless for me, while missing the INS key it is a big handicap. **: on Macs, the FN key combined with the special keys should output one of: 113 (Mute), 114 (VolumeDown), 115 (VolumeUp), 161 (EjectCD), 163 (NextSong), 164 (PlayPause), 165 (PreviousSong). [[this does not happen on linux, or at least I can't hit those keycodes - tested in evtest- using FN+F##... so my guess that FN doesn't act as a modifier]] those keycode should came out of the second input devices (yes, the apple USB keyboard is seen as two distinct event devices, one for keyboard, one for special keys) [1] http://images.apple.com/euro/keyboard/scripts/gallery/wired_1_20070813.jpg you can see Fn in place of Insert, and the special function keys F7~F12 (apparently not working) -- #include <stdio.h> main(){printf("%x",4275974592);}