The wl_keyboard interface

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

## Data Structures

struct | wl_keyboard_listener

## Macros

#define | WL_KEYBOARD_KEYMAP_SINCE_VERSION 1
#define | WL_KEYBOARD_ENTER_SINCE_VERSION 1
#define | WL_KEYBOARD_LEAVE_SINCE_VERSION 1
#define | WL_KEYBOARD_KEY_SINCE_VERSION 1
#define | WL_KEYBOARD_MODIFIERS_SINCE_VERSION 1
#define | WL_KEYBOARD_REPEAT_INFO_SINCE_VERSION 4
#define | WL_KEYBOARD_RELEASE_SINCE_VERSION 3

## Enumerations

enum | wl_keyboard_keymap_format { WL_KEYBOARD_KEYMAP_FORMAT_NO_KEYMAP = 0, WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1 = 1 }
enum | wl_keyboard_key_state { WL_KEYBOARD_KEY_STATE_RELEASED = 0, WL_KEYBOARD_KEY_STATE_PRESSED = 1 }

## Functions

static int | wl_keyboard_add_listener (struct wl_keyboard *wl_keyboard, const struct wl_keyboard_listener *listener, void *data)
static void | wl_keyboard_set_user_data (struct wl_keyboard *wl_keyboard, void *user_data)
static void * | wl_keyboard_get_user_data (struct wl_keyboard *wl_keyboard)
static void | wl_keyboard_destroy (struct wl_keyboard *wl_keyboard)
static void | wl_keyboard_release (struct wl_keyboard *wl_keyboard)

## Detailed Description

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

## Macro Definition Documentation

## WL_KEYBOARD_ENTER_SINCE_VERSION

#define WL_KEYBOARD_ENTER_SINCE_VERSION 1

Definition at line 4634 of file wayland-client-protocol.h.

## WL_KEYBOARD_KEY_SINCE_VERSION

#define WL_KEYBOARD_KEY_SINCE_VERSION 1

Definition at line 4642 of file wayland-client-protocol.h.

## WL_KEYBOARD_KEYMAP_SINCE_VERSION

#define WL_KEYBOARD_KEYMAP_SINCE_VERSION 1

Definition at line 4630 of file wayland-client-protocol.h.

## WL_KEYBOARD_LEAVE_SINCE_VERSION

#define WL_KEYBOARD_LEAVE_SINCE_VERSION 1

Definition at line 4638 of file wayland-client-protocol.h.

## WL_KEYBOARD_MODIFIERS_SINCE_VERSION

#define WL_KEYBOARD_MODIFIERS_SINCE_VERSION 1

Definition at line 4646 of file wayland-client-protocol.h.

## WL_KEYBOARD_RELEASE_SINCE_VERSION

#define WL_KEYBOARD_RELEASE_SINCE_VERSION 3

Definition at line 4655 of file wayland-client-protocol.h.

## WL_KEYBOARD_REPEAT_INFO_SINCE_VERSION

#define WL_KEYBOARD_REPEAT_INFO_SINCE_VERSION 4

Definition at line 4650 of file wayland-client-protocol.h.

## Enumeration Type Documentation

## wl_keyboard_key_state

enum wl_keyboard_key_state

physical key state

Describes the physical state of a key that produced the key event.

Enumerator
WL_KEYBOARD_KEY_STATE_RELEASED | key is not pressed
WL_KEYBOARD_KEY_STATE_PRESSED | key is pressed

Definition at line 4494 of file wayland-client-protocol.h.

{
/**
* key is not pressed
*/
WL_KEYBOARD_KEY_STATE_RELEASED = 0,
/**
* key is pressed
*/
WL_KEYBOARD_KEY_STATE_PRESSED = 1,
};

## wl_keyboard_keymap_format

enum wl_keyboard_keymap_format

keyboard mapping format

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

Enumerator
WL_KEYBOARD_KEYMAP_FORMAT_NO_KEYMAP | no keymap; client must understand how to interpret the raw keycode
WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1 | libxkbcommon compatible; to determine the xkb keycode, clients must add 8 to the key event keycode

Definition at line 4474 of file wayland-client-protocol.h.

{
/**
* no keymap; client must understand how to interpret the raw keycode
*/
WL_KEYBOARD_KEYMAP_FORMAT_NO_KEYMAP = 0,
/**
* libxkbcommon compatible; to determine the xkb keycode, clients must add 8 to the key event keycode
*/
WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1 = 1,
};

## Function Documentation

## wl_keyboard_add_listener()

static int wl_keyboard_add_listener | ( | struct wl_keyboard * | wl_keyboard,
|  | const struct wl_keyboard_listener * | listener,
|  | void * | data
| ) |  |

inline static

Definition at line 4618 of file wayland-client-protocol.h.

{
return wl_proxy_add_listener((struct wl_proxy *) wl_keyboard,
(void (**)(void)) listener, data);
}

## wl_keyboard_destroy()

static void wl_keyboard_destroy | ( | struct wl_keyboard * | wl_keyboard | ) |

inline static

Definition at line 4679 of file wayland-client-protocol.h.

{
wl_proxy_destroy((struct wl_proxy *) wl_keyboard);
}

## wl_keyboard_get_user_data()

static void* wl_keyboard_get_user_data | ( | struct wl_keyboard * | wl_keyboard | ) |

inline static

Definition at line 4666 of file wayland-client-protocol.h.

{
return wl_proxy_get_user_data((struct wl_proxy *) wl_keyboard);
}

## wl_keyboard_release()

static void wl_keyboard_release | ( | struct wl_keyboard * | wl_keyboard | ) |

inline static

Definition at line 4688 of file wayland-client-protocol.h.

{
wl_proxy_marshal((struct wl_proxy *) wl_keyboard,
WL_KEYBOARD_RELEASE);
wl_proxy_destroy((struct wl_proxy *) wl_keyboard);
}

References WL_KEYBOARD_RELEASE.

## wl_keyboard_set_user_data()

static void wl_keyboard_set_user_data | ( | struct wl_keyboard * | wl_keyboard,
|  | void * | user_data
| ) |  |

inline static

Definition at line 4659 of file wayland-client-protocol.h.

{
wl_proxy_set_user_data((struct wl_proxy *) wl_keyboard, user_data);
}
WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1
@ WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1
Definition: wayland-client-protocol.h:4482
WL_KEYBOARD_KEY_STATE_RELEASED
@ WL_KEYBOARD_KEY_STATE_RELEASED
Definition: wayland-client-protocol.h:4498
WL_KEYBOARD_KEY_STATE_PRESSED
@ WL_KEYBOARD_KEY_STATE_PRESSED
Definition: wayland-client-protocol.h:4502
WL_KEYBOARD_RELEASE
#define WL_KEYBOARD_RELEASE
Definition: wayland-client-protocol.h:4625
WL_KEYBOARD_KEYMAP_FORMAT_NO_KEYMAP
@ WL_KEYBOARD_KEYMAP_FORMAT_NO_KEYMAP
Definition: wayland-client-protocol.h:4478
data
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: SDL_opengl.h:1974