1

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 on xev unless coupled with some other (f1 through f12) key. But even then it doesn't detect some
    • Fn-f5 is supposed to be mapped to XF86MonBrightnessDown but returns nothing, similar for Fn-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:

  1. What do the weird output I have shared above mean and when are they returned?
  2. What does the KeySym NoSymbol mean?
  3. 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!

1 Answer 1

4

The FocusIn and FocusOut events mean some other application is reacting to the keypress. Usual suspects are your Window Manager ("WM", often part of "the Desktop") and other applications like assistants for language entry (Japanese, Chinese, etc.)

The Fn is usually intercepted by the Embedded Controller ("EC") of your laptop. It doesn't produce a normal key symbol, and the EC decides what to do with it, and what key events to generate when it is pressed together with other keys. This means you cannot customize it, because ECs for laptops are all different, and if they are configurable, the manufacturer keeps that secret.

NoSymbol means that whatever the EC returns for that key combination is not mapped to an X symbol. Use evtest to see what key events are produced in the kernel input layer.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.