The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
kbd.h
Go to the documentation of this file.
1#pragma once
2
3#include <stdint.h>
4
5/**
6 * @file sys/kbd.h
7 * @brief the ioctls of /dev/kbd: list, read and set the keyboard layout.
8 *
9 * the values and the struct are ABI and must match
10 * src/drivers/keyboard/keyboard_ioctl.h.
11 */
12
13#define KBD_LAYOUT_NAME_MAX 32
14
15/**
16 * KBD_IOC_LAYOUT_NAME: set index; the kernel fills in name.
17 */
23
24#define KBD_IOC_LAYOUT_COUNT 0x4B80 // out: uint32_t, how many layouts there are
25#define KBD_IOC_LAYOUT_NAME 0x4B81 // in/out: struct kbd_layout_name (EINVAL past the end)
26#define KBD_IOC_GET_LAYOUT 0x4B82 // out: uint32_t, the index of the active layout
27#define KBD_IOC_SET_LAYOUT 0x4B83 // in: uint32_t, the index to make active
28#define KBD_IOC_GET_KEYMAP 0x4B84 // out: struct kbd_keymap, the active layout's tables
29
30#define KBD_KEYMAP_KEYS 128
31
32/**
33 * KBD_IOC_GET_KEYMAP: the characters of the active layout, by key code
34 * (the Linux key code of /dev/input, below 128). 0: the key gives no
35 * character. the characters are ASCII. altgr is for either Alt key (the
36 * Option keys on a Mac keyboard), as on the text console.
37 */
#define KBD_LAYOUT_NAME_MAX
Definition keyboard_ioctl.h:12
#define KBD_KEYMAP_KEYS
Definition keyboard_ioctl.h:29
unsigned int uint32_t
Definition fb.h:17
integer types of fixed width.
KBD_IOC_GET_KEYMAP: the characters of the active layout, by key code (the Linux key code of /dev/inpu...
Definition kbd.h:39
char shift[KBD_KEYMAP_KEYS]
Definition kbd.h:41
char altgr[KBD_KEYMAP_KEYS]
Definition kbd.h:42
char altgr_shift[KBD_KEYMAP_KEYS]
Definition kbd.h:43
char normal[KBD_KEYMAP_KEYS]
Definition kbd.h:40
KBD_IOC_LAYOUT_NAME: set index; the kernel fills in name.
Definition kbd.h:19
uint32_t index
Definition kbd.h:20
char name[KBD_LAYOUT_NAME_MAX]
Definition kbd.h:21