xev
shows 72-keycode events. […] How can I detect which key is being "pressed"?
No meu Kubuntu 16.04.3, LTS xev
mostra não apenas keykodes. A tecla com o código de acesso 72, ao ser pressionada constantemente, faz com que xev
repita a seguinte saída:
KeyPress event, serial 40, synthetic NO, window 0x3c00001,
root 0x2c4, subw 0x0, time 2544694, (173,-21), root:(173,8),
state 0x10, keycode 72 (keysym 0xffc3, F6), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 40, synthetic NO, window 0x3c00001,
root 0x2c4, subw 0x0, time 2544732, (173,-21), root:(173,8),
state 0x10, keycode 72 (keysym 0xffc3, F6), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
Linha importante com explicação:
state 0x10, keycode 72 (keysym 0xffc3, F6), same_screen YES,
keycode obviously ^^ ^^ human-readable name
Então é F6 .