Keyboard events

Key events are generated when a key changes its logical state, usually by being pressed or released. More...

Data Structures

struct  libinput_event_keyboard
 A keyboard event representing a key press/release. More...
 

Functions

uint32_t libinput_event_keyboard_get_time (struct libinput_event_keyboard *event)
 
uint64_t libinput_event_keyboard_get_time_usec (struct libinput_event_keyboard *event)
 
uint32_t libinput_event_keyboard_get_key (struct libinput_event_keyboard *event)
 
enum libinput_key_state libinput_event_keyboard_get_key_state (struct libinput_event_keyboard *event)
 
struct libinput_eventlibinput_event_keyboard_get_base_event (struct libinput_event_keyboard *event)
 
uint32_t libinput_event_keyboard_get_seat_key_count (struct libinput_event_keyboard *event)
 For the key of a LIBINPUT_EVENT_KEYBOARD_KEY event, return the total number of keys pressed on all devices on the associated seat after the event was triggered.
 

Detailed Description

Key events are generated when a key changes its logical state, usually by being pressed or released.

Function Documentation

◆ libinput_event_keyboard_get_base_event()

struct libinput_event * libinput_event_keyboard_get_base_event ( struct libinput_event_keyboard event)
Returns
The generic libinput_event of this event

◆ libinput_event_keyboard_get_key()

uint32_t libinput_event_keyboard_get_key ( struct libinput_event_keyboard event)
Returns
The keycode that triggered this key event

◆ libinput_event_keyboard_get_key_state()

enum libinput_key_state libinput_event_keyboard_get_key_state ( struct libinput_event_keyboard event)
Returns
The state change of the key

◆ libinput_event_keyboard_get_seat_key_count()

uint32_t libinput_event_keyboard_get_seat_key_count ( struct libinput_event_keyboard event)

For the key of a LIBINPUT_EVENT_KEYBOARD_KEY event, return the total number of keys pressed on all devices on the associated seat after the event was triggered.

Note
It is an application bug to call this function for events other than LIBINPUT_EVENT_KEYBOARD_KEY. For other events, this function returns 0.
Returns
The seat wide pressed key count for the key of this event

◆ libinput_event_keyboard_get_time()

uint32_t libinput_event_keyboard_get_time ( struct libinput_event_keyboard event)
Note
Timestamps may not always increase. See the libinput documentation for more details.
Returns
The event time for this event

◆ libinput_event_keyboard_get_time_usec()

uint64_t libinput_event_keyboard_get_time_usec ( struct libinput_event_keyboard event)
Note
Timestamps may not always increase. See the libinput documentation for more details.
Returns
The event time for this event in microseconds