# man > xev(1)

> **TLDR:** Print contents of X events.
>
- Monitor all occurring X events:
  `xev`
- Monitor all X events of the root window instead of creating a new one:
  `xev -root`
- Monitor all X events of a particular window:
  `xev -id {{window_id}}`
- Monitor X events from a given category (can be specified multiple times):
  `xev -event {{event_category}}`

*Source: tldr-pages*

---

[_XEV_(1)](https://www.chedong.com/phpMan.php/man/XEV/1/markdown)                                 General Commands Manual                                [_XEV_(1)](https://www.chedong.com/phpMan.php/man/XEV/1/markdown)

## NAME
       xev - print contents of X events

## SYNOPSIS
       **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_ ...]]

## DESCRIPTION
       _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.

## OPTIONS
### -display _
               This option specifies the X server to contact.

### -geometry _
               This  option  specifies  the size and/or location of the window, if a window is to be
               created.

### -bw _
               This option specifies the border width for the window.

### -bs _
               This option specifies what kind of backing store to give the window.  The default  is
               NotUseful.  Backing store refers to the the pixels saved off-screen when the X server
               maintains the contents of a window; NotUseful means that the xev process will  redraw
               its contents itself, as necessary.

### -id _
               This  option specifies that the window with the given id should be monitored, instead
               of creating a new window.

### -root   
               new window.

### -s      
               are  similar  to  backing  store,  but they refer rather to the saving of pixels off-
               screen when the current window obscures other windows. Save unders are only advisory,
               and are normally set for popup dialogs and other transient windows.

### -name _
               This option specifies the name to assign to the created window.

### -rv     

### -event _
               Select which events to display.  The **-event **option can be specified multiple times to
               select multiple types of events.   When  not  specified,  all  events  are  selected.
               Available  event masks: keyboard mouse expose visibility structure substructure focus
               property colormap owner_grab_button randr button

### -version
               This option prints the program version and exits.

## SEE ALSO
       [X(7)](https://www.chedong.com/phpMan.php/man/X/7/markdown), [xwininfo(1)](https://www.chedong.com/phpMan.php/man/xwininfo/1/markdown), [xdpyinfo(1)](https://www.chedong.com/phpMan.php/man/xdpyinfo/1/markdown), Xlib Programmers Manual, X Protocol Specification

## AUTHOR
       Jim Fulton, MIT X Consortium

X Version 11                                  xev 1.2.5                                       [_XEV_(1)](https://www.chedong.com/phpMan.php/man/XEV/1/markdown)
