Forrest logo
tool overview
On this page you find all important commands for the CLI tool xev. If the command you are looking for is missing please ask our AI.

xev

Xev is a command line tool in Linux that allows users to monitor and analyze X events, which are events generated by the X Window System.

When running xev, a small X window opens up, capturing all X events that occur within that window. It can be used to examine how certain applications or the window manager interact with the X server.

Xev provides detailed information about each event, including the event type, window, timestamp, and various event-specific details such as keycodes or mouse positions. This information can help users troubleshoot or understand the inner workings of graphical applications.

One common use case for xev is to identify keycodes and keysyms associated with specific keys on the keyboard. It allows users to press a key and see the corresponding keycode and keysym, which can be useful when configuring keybindings in window managers or other applications.

Additionally, xev can be used to test and debug X11 client applications and utilities. By monitoring the events generated when interacting with an application, it can help to identify issues related to event handling or unexpected behavior.

Xev enables users to examine all aspects of X events, including button presses, keyboard inputs, window resizing, focus changes, and more. This comprehensive coverage makes it a valuable diagnostic tool for X-related troubleshooting.

By default, xev displays events for the root window, but it can also be used to capture events from a specific window by passing its ID as an argument.

Xev is typically included as part of the X11-utils package in most Linux distributions. It is a lightweight, command line tool that can be easily accessed and used by both beginners and advanced users.

When used with other utilities, such as xmodmap or xinput, xev becomes even more powerful, allowing users to remap keys, configure input devices, or modify other X-related settings.

Overall, xev provides an essential tool for monitoring and analyzing X events, enabling users to gain insights into the behavior and interactions of their X Window System.

List of commands for xev:

  • xev:tldr:5b082 xev: Monitor all occurring X events.
    $ xev
    try on your machine
    explain this command
  • xev:tldr:9276f xev: Monitor all X events of a particular window.
    $ xev -id ${window_id}
    try on your machine
    explain this command
  • xev:tldr:9ec69 xev: Monitor all X events of the root window instead of creating a new one.
    $ xev -root
    try on your machine
    explain this command
  • xev:tldr:d119f xev: Monitor X events from a given category (can be specified multiple times).
    $ xev -event ${event_category}
    try on your machine
    explain this command
tool overview