Linux "xev" Command Line Options and Examples
print contents of X events

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.


Usage:

xev [-display displayname] [-geometry geom] [-bw pixels] [-bs {NotUseful,WhenMapped,Always}] [-id windowid]
[-root] [-s] [-name string] [-rv] [-version] [-event event_mask [-event event_mask ...]]






Command Line Options:

-display
This option specifies the X server to contact.
xev -display ...
-geometry
This option specifies the size and/or location of the window, if a window is to be created.
xev -geometry ...
-bw
This option specifies the border width for the window.
xev -bw ...
-bs
This option specifies what kind of backing store to give the window. The default is NotUseful. Back‐ing store refers to the the pixels saved off-screen when the X server maintains the contents of a win‐dow; NotUseful means that the xev process will redraw its contents itself, as necessary.
xev -bs ...
-id
This option specifies that the window with the given id should be monitored, instead of creating a newwindow.
xev -id ...
-root
This option specifies that the root window should be monitored, instead of creating a new window.
xev -root ...
-name
This option specifies the name to assign to the created window.
xev -name ...
-rv
This option specifies that the window should be in reverse video.
xev -rv ...
-event
Select which events to display. The -event option can be specified multiple times to select multipletypes of events. When not specified, all events are selected. Available event masks: keyboard mouseexpose visibility structure substructure focus property colormap owner_grab_button randr button
xev -event ...
-version
This option prints the program version and exits.
xev -version ...