Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have X11R7-based desktop linux. I want to debug key modifiers of my keyboard. I have some left and right controls, alts, metas, etc., but for some reason (1) I'm not quite sure which is which from XKB point of view.

So, how do I debug modifiers on XKB keymaps?

(1) apple macbook + virtualbox + virtualized linux + X11.

share|improve this question

1 Answer 1

up vote 4 down vote accepted

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.