Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .