{
    "mode": "man",
    "parameter": "xev",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/xev/1/json",
    "generated": "2026-06-03T04:25:10Z",
    "synopsis": "xev  [-display displayname] [-geometry geom] [-bw pixels] [-bs {NotUseful,WhenMapped,Always}]\n[-id windowid] [-root] [-s]  [-name  string]  [-rv]  [-version]  [-event  eventmask  [-event\neventmask ...]]",
    "sections": {
        "NAME": {
            "content": "xev - print contents of X events\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "xev  [-display displayname] [-geometry geom] [-bw pixels] [-bs {NotUseful,WhenMapped,Always}]\n[-id windowid] [-root] [-s]  [-name  string]  [-rv]  [-version]  [-event  eventmask  [-event\neventmask ...]]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Xev  creates  a window and then asks the X server to send it events whenever anything happens\nto the window (such as it being moved, resized, typed in, clicked in, etc.).   You  can  also\nattach  it to an existing window.  It is useful for seeing what causes events to occur and to\ndisplay the information that they contain; it is  essentially  a  debugging  and  development\ntool, and should not be needed in normal usage.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-display",
                    "content": "This option specifies the X server to contact.\n"
                },
                {
                    "name": "-geometry",
                    "content": "This  option  specifies  the size and/or location of the window, if a window is to be\ncreated.\n"
                },
                {
                    "name": "-bw",
                    "content": "This option specifies the border width for the window.\n"
                },
                {
                    "name": "-bs",
                    "content": "This option specifies what kind of backing store to give the window.  The default  is\nNotUseful.  Backing store refers to the the pixels saved off-screen when the X server\nmaintains the contents of a window; NotUseful means that the xev process will  redraw\nits contents itself, as necessary.\n"
                },
                {
                    "name": "-id",
                    "content": "This  option specifies that the window with the given id should be monitored, instead\nof creating a new window.\n"
                },
                {
                    "name": "-root",
                    "content": "new window.\n"
                },
                {
                    "name": "-s",
                    "content": "are similar to backing store, but they refer rather to  the  saving  of  pixels  off-\nscreen when the current window obscures other windows. Save unders are only advisory,\nand are normally set for popup dialogs and other transient windows.\n",
                    "flag": "-s"
                },
                {
                    "name": "-name",
                    "content": "This option specifies the name to assign to the created window.\n"
                },
                {
                    "name": "-rv",
                    "content": ""
                },
                {
                    "name": "-event",
                    "content": "Select which events to display.  The -event option can be specified multiple times to\nselect  multiple  types  of  events.   When  not  specified, all events are selected.\nAvailable event masks: keyboard mouse expose visibility structure substructure  focus\nproperty colormap ownergrabbutton randr button\n"
                },
                {
                    "name": "-version",
                    "content": "This option prints the program version and exits.\n"
                }
            ]
        },
        "SEE ALSO": {
            "content": "X(7), xwininfo(1), xdpyinfo(1), Xlib Programmers Manual, X Protocol Specification\nSee X(7) for a full statement of rights and permissions.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Jim Fulton, MIT X Consortium\n\n\n\nX Version 11                                  xev 1.2.3                                       XEV(1)",
            "subsections": []
        }
    },
    "summary": "xev - print contents of X events",
    "flags": [
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "This option specifies the X server to contact."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "This option specifies the size and/or location of the window, if a window is to be created."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "This option specifies the border width for the window."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "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."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "This option specifies that the window with the given id should be monitored, instead of creating a new window."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "new window."
        },
        {
            "flag": "-s",
            "long": null,
            "arg": null,
            "description": "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."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "This option specifies the name to assign to the created window."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "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 ownergrabbutton randr button"
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "This option prints the program version and exits."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "X",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/X/7/json"
        },
        {
            "name": "xwininfo",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/xwininfo/1/json"
        },
        {
            "name": "xdpyinfo",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/xdpyinfo/1/json"
        },
        {
            "name": "X",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/X/7/json"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "Print contents of X events.",
        "examples": [
            {
                "description": "Monitor all occurring X events",
                "command": "xev"
            },
            {
                "description": "Monitor all X events of the root window instead of creating a new one",
                "command": "xev -root"
            },
            {
                "description": "Monitor all X events of a particular window",
                "command": "xev -id {{window_id}}"
            },
            {
                "description": "Monitor X events from a given category (can be specified multiple times)",
                "command": "xev -event {{event_category}}"
            }
        ]
    }
}