xcb\_key\_press\_event\_t(3) XCB Events xcb\_key\_press\_event\_t(3)

# [NAME](#NAME)

xcb\_key\_press\_event\_t - a key was pressed/released

# [SYNOPSIS](#SYNOPSIS)

**#include &lt;xcb/xproto.h&gt;**

## [Event datastructure](#Event_datastructure)

```
typedef struct xcb_key_press_event_t {


    uint8_t         response_type;


    xcb_keycode_t   detail;


    uint16_t        sequence;


    xcb_timestamp_t time;


    xcb_window_t    root;


    xcb_window_t    event;


    xcb_window_t    child;


    int16_t         root_x;


    int16_t         root_y;


    int16_t         event_x;


    int16_t         event_y;


    uint16_t        state;


    uint8_t         same_screen;


    uint8_t         pad0;
} xcb_key_press_event_t;
```

# [EVENT FIELDS](#EVENT_FIELDS)

[*response\_type*](#response_type)

The type of this event, in this case *XCB\_KEY\_RELEASE*. This field is also present in the *xcb\_generic\_event\_t* and can be used to tell events apart from each other.

[*sequence*](#sequence)

The sequence number of the last request processed by the X11 server.

[*detail*](#detail)

The keycode (a number representing a physical key on the keyboard) of the key which was pressed.

[*time*](#time)

Time when the event was generated (in milliseconds).

[*root*](#root)

The root window of *child*.

[*event*](#event)

NOT YET DOCUMENTED.

[*child*](#child)

NOT YET DOCUMENTED.

[*root\_x*](#root_x)

The X coordinate of the pointer relative to the *root* window at the time of the event.

[*root\_y*](#root_y)

The Y coordinate of the pointer relative to the *root* window at the time of the event.

[*event\_x*](#event_x)

If *same\_screen* is true, this is the X coordinate relative to the *event* window's origin. Otherwise, *event\_x* will be set to zero.

[*event\_y*](#event_y)

If *same\_screen* is true, this is the Y coordinate relative to the *event* window's origin. Otherwise, *event\_y* will be set to zero.

[*state*](#state)

The logical state of the pointer buttons and modifier keys just prior to the event.

[*same\_screen*](#same_screen)

Whether the *event* window is on the same screen as the *root* window.

# [DESCRIPTION](#DESCRIPTION)

# [SEE ALSO](#SEE_ALSO)

[**xcb\_generic\_event\_t**(3)](/man/os/libxcb/xcb_generic_event_t.3), [**xcb\_grab\_key**(3)](/man/os/libxcb/xcb_grab_key.3), [**xcb\_grab\_keyboard**(3)](/man/os/libxcb/xcb_grab_keyboard.3)

# [AUTHOR](#AUTHOR)

Generated from xproto.xml. Contact xcb@lists.freedesktop.org for corrections and improvements.

libxcb 1.17.0 X Version 11

---

Document: xcb_key_press_event_t(3) from libxcb 1.17.0-r16 (Chainguard OS)
Source: https://gitlab.freedesktop.org/xorg/lib/libxcb.git
