I am trying to map a function key combination to an XF86 key symbol. The key combination is Fn+F1, which I was able to use showkey
to get the raw keycode for.
jason@io ~ $ showkey
kb mode was RAW
[ if you are trying this under X, it might not work
since the X server is also reading /dev/console ]
press any key (program terminates 10s after last keypress)...
keycode 28 release
keycode 466 press
keycode 466 release
keycode 113 press
keycode 113 release
keycode 114 press
keycode 114 release
Adding 8 to the showkey
keycode, as mentioned in another question, gives an X keycode of 474. Although, running xev
doesn't seem to catch the key press or release. It does catch the next two function key combinations though (Fn+F2, Fn+F3).
jason@io ~ $ xev -root
FocusIn event, serial 18, synthetic NO, window 0x71,
mode NotifyGrab, detail NotifyInferior
KeymapNotify event, serial 18, synthetic NO, window 0x0,
keys: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
FocusOut event, serial 18, synthetic NO, window 0x71,
mode NotifyUngrab, detail NotifyInferior
FocusIn event, serial 18, synthetic NO, window 0x71,
mode NotifyGrab, detail NotifyInferior
KeymapNotify event, serial 18, synthetic NO, window 0x0,
keys: 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
FocusOut event, serial 18, synthetic NO, window 0x71,
mode NotifyUngrab, detail NotifyInferior
I'm trying to handle the key combination in the window manager, where I have number of other working bindings, including Fn+F2 and Fn+F3. However, it seems like either X isn't receiving the key press, or maybe .Xmodmap
isn't binding the keycode correctly.
Am I not doing something right? Is there a another way to do this?