I used the X11 tool xev to sniff what the keys are generating, here only for the physical key which is labeled with =
(normal) and +
(shift):
DISPLAY=:0 xev | tee -a xev.out
This gives for the key = +
:
KeyPress event, serial 35, synthetic NO, window 0x800001,
root 0x512, subw 0x800002, time 230474, (39,35), root:(39,67),
state 0x0, keycode 21 (keysym 0xbf, questiondown), same_screen YES,
XLookupString gives 2 bytes: (c2 bf) "¿"
XmbLookupString gives 2 bytes: (c2 bf) "¿"
XFilterEvent returns: False
and together with SHIFT:
KeyPress event, serial 35, synthetic NO, window 0x800001,
root 0x512, subw 0x800002, time 269343, (39,35), root:(39,67),
state 0x1, keycode 21 (keysym 0xa1, exclamdown), same_screen YES,
XLookupString gives 2 bytes: (c2 a1) "¡"
XmbLookupString gives 2 bytes: (c2 a1) "¡"
XFilterEvent returns: False
If I now run:
DISPLAY=:0 xmodmap -e "keycode 21 = equal plus"
it gives:
KeyPress event, serial 32, synthetic NO, window 0x800001,
root 0x512, subw 0x800002, time 348519, (39,35), root:(39,67),
state 0x0, keycode 21 (keysym 0x3d, equal), same_screen YES,
XLookupString gives 1 bytes: (3d) "="
XmbLookupString gives 1 bytes: (3d) "="
XFilterEvent returns: False
and togethet with SHIFT
KeyPress event, serial 35, synthetic NO, window 0x800001,
root 0x512, subw 0x800002, time 376107, (39,35), root:(39,67),
state 0x1, keycode 21 (keysym 0x2b, plus), same_screen YES,
XKeysymToKeycode returns keycode: 35
XLookupString gives 1 bytes: (2b) "+"
XmbLookupString gives 1 bytes: (2b) "+"
XFilterEvent returns: False
i.e. the physical key gives what it has as labels on it. Ofc, this works only in any X11 application, for example, I tested the (new installed) xterm
, but not in the terminal app
of the L5.
So, the question is: where in Debian / PureOS is the mapping of such BT keyboard defined?