Product SiteDocumentation Site

A.17. wl_keyboard - keyboard input device

The wl_keyboard interface represents one or more keyboards associated with a seat.

A.17.1. Events provided by wl_keyboard

A.17.1.1. wl_keyboard::keymap - keyboard mapping

This event provides a file descriptor to the client which can be memory-mapped to provide a keyboard mapping description.

wl_keyboard::keymap arguments

format
Type: uint
fd
Type: fd
size
Type: uint

A.17.1.2. wl_keyboard::enter - enter event

Notification that this seat's keyboard focus is on a certain surface.

wl_keyboard::enter arguments

serial
Type: uint
surface
Type: object
keys
Type: array
the currently pressed keys

A.17.1.3. wl_keyboard::leave - leave event

Notification that this seat's keyboard focus is no longer on a certain surface.
The leave notification is sent before the enter notification for the new focus.

wl_keyboard::leave arguments

serial
Type: uint
surface
Type: object

A.17.1.4. wl_keyboard::key - key event

A key was pressed or released. The time argument is a timestamp with millisecond granularity, with an undefined base.

wl_keyboard::key arguments

serial
Type: uint
time
Type: uint
timestamp with millisecond granularity
key
Type: uint
state
Type: uint

A.17.1.5. wl_keyboard::modifiers - modifier and group state

Notifies clients that the modifier and/or group state has changed, and it should update its local state.

wl_keyboard::modifiers arguments

serial
Type: uint
mods_depressed
Type: uint
mods_latched
Type: uint
mods_locked
Type: uint
group
Type: uint

A.17.2. Enums provided by wl_keyboard

A.17.2.1. wl_keyboard::keymap_format - keyboard mapping format

This specifies the format of the keymap provided to the client with the wl_keyboard.keymap event.

wl_keyboard::keymap_format values

no_keymap
Value: 0
no keymap; client must understand how to interpret the raw keycode
xkb_v1
Value: 1
libxkbcommon compatible

A.17.2.2. wl_keyboard::key_state - physical key state

Describes the physical state of a key which provoked the key event.

wl_keyboard::key_state values

released
Value: 0
key is not pressed
pressed
Value: 1
key is pressed