Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 recall in the past having a tool to run on Solaris that would allow me to see what X events are being generated by the keyboard and mouse. What is the application to do this on Linux Centos4?

share|improve this question
up vote 3 down vote accepted

xev is probably the tool you're looking for.

Xev creates a window and then asks the X server to send it events whenever anything happens to the window (such as it being moved, resized, typed in, clicked in, etc.). You can also attach it to an existing window. It is useful for seeing what causes events to occur and to display the information that they contain; it is essentially a debugging and development tool, and should not be needed in normal usage.

It prints the full event contents like this for example:

MotionNotify event, serial 38, synthetic NO, window 0x1a00001,
    root 0x1ff, subw 0x0, time 11360240, (108,129), root:(1078,148),
    state 0x0, is_hint 0, same_screen YES

or for a key press:

KeyPress event, serial 38, synthetic NO, window 0x1a00001,
    root 0x1ff, subw 0x0, time 11362278, (111,107), root:(1081,126),
    state 0x0, keycode 24 (keysym 0x61, a), same_screen YES,
    XLookupString gives 1 bytes: (61) "a"
    XmbLookupString gives 1 bytes: (61) "a"
    XFilterEvent returns: False
share|improve this answer

Your Answer


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.