My keyboard modifier map as returned by xmodmap is:
shift Shift_L (0x32), Shift_R (0x3e) lock Caps_Lock (0x42) control Control_L (0x25), Control_R (0x69) mod1 Alt_L (0x40), Alt_R (0x6c), Meta_L (0xcd) mod2 Num_Lock (0x4d) mod3 mod4 Super_L (0x85), Super_R (0x86), Super_L (0xce), Hyper_L (0xcf) mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb)
When I run xev | awk -F'\''[ )]+'\'' '\''/^KeyPress/ { a[NR+2] } NR in a { printf "%-3s %s\n", $5, $8 }'\' to awk out just the keys' serials and names from the xev output soup I get no response for the <PrintScreen>, <Fn>, and the <Return> key on my number-pad. The raw xev output for these keys looks very different from the regular output and looks something like this:
<PrintScreen>pressed and released
FocusOut event, serial 32, synthetic NO, window 0x1e00001, mode NotifyGrab, detail NotifyAncestor FocusOut event, serial 32, synthetic NO, window 0x1e00001, mode NotifyUngrab, detail NotifyPointer FocusIn event, serial 32, synthetic NO, window 0x1e00001, mode NotifyUngrab, detail NotifyAncestor KeymapNotify event, serial 32, synthetic NO, window 0x0, keys: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
<PrintScreen>pressed and released again
FocusOut event, serial 32, synthetic NO, window 0x1e00001, mode NotifyGrab, detail NotifyAncestor FocusOut event, serial 32, synthetic NO, window 0x1e00001, mode NotifyUngrab, detail NotifyPointer FocusIn event, serial 32, synthetic NO, window 0x1e00001, mode NotifyUngrab, detail NotifyAncestor KeymapNotify event, serial 32, synthetic NO, window 0x0, keys: 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
- Sometimes when I press & release
<PrintScreen>, the output shows a different<serial>altogether, such as (sharing just a snippet here):
KeymapNotify event, serial 28, synthetic NO, window 0x0, keys: 4294967234 0 0 0 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
<Fn>by itself returns nothing onxevunless coupled with some other (f1throughf12) key. But even then it doesn't detect someFn-f5is supposed to be mapped toXF86MonBrightnessDownbut returns nothing, similar forFn-f6(XF86MonBrightnessUp). The xev raw output is similar to that of<PrintScreen>:
FocusOut event, serial 32, synthetic NO, window 0x1e00001, mode NotifyGrab, detail NotifyAncestor FocusOut event, serial 32, synthetic NO, window 0x1e00001, mode NotifyUngrab, detail NotifyPointer FocusIn event, serial 32, synthetic NO, window 0x1e00001, mode NotifyUngrab, detail NotifyAncestor KeymapNotify event, serial 32, synthetic NO, window 0x0, keys: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
* `Fn-f7` returns `NoSymbol` when it's supposed to be mapped to `XF86Display` * `Fn-f8` is mapped to `Super_L` somehow. My questions are:
- What do the weird output I have shared above mean and when are they returned?
- What does the KeySym
NoSymbolmean? - How do I correct wrong mappings--or generally--remap a key, such as the ones with
NoSymbol
Hoping to build a concentrated, canonical reference to how keymappings generally work on UNIX-like systems through these questions that others with similar issues can refer to, so please be as detailed as time permits.
TIA!