xev
! This is an X event viewer program. Start it from a console and press your keys; it will register an event and give all kinds of juicy detail about what's going on.
The output looks like this:
KeyPress event, serial 33, synthetic NO, window 0x1200001,
root 0x2e, subw 0x0, time 122600873, (-49,299), root:(679,325),
state 0x0, keycode 255 (keysym 0xffec, Super_R), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 34, synthetic NO, window 0x1200001,
root 0x2e, subw 0x0, time 122600971, (-49,299), root:(679,325),
state 0x0, keycode 255 (keysym 0xffec, Super_R), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False