source:
mainline/uspace/lib/c/include/io/kbd_event.h@
d7f7a4a
| Last change on this file since d7f7a4a was d7f7a4a, checked in by , 4 years ago | |
|---|---|
|
|
| File size: 708 bytes | |
| Rev | Line | |
|---|---|---|
| [111d2d6] | 1 | /* |
| [d7f7a4a] | 2 | * SPDX-FileCopyrightText: 2012 Jiri Svoboda |
| [111d2d6] | 3 | * |
| [d7f7a4a] | 4 | * SPDX-License-Identifier: BSD-3-Clause |
| [111d2d6] | 5 | */ |
| 6 | ||
| 7 | /** @addtogroup libc | |
| 8 | * @{ | |
| 9 | */ | |
| 10 | /** @file | |
| 11 | */ | |
| 12 | ||
| [4805495] | 13 | #ifndef _LIBC_IO_KBD_EVENT_H_ |
| 14 | #define _LIBC_IO_KBD_EVENT_H_ | |
| [111d2d6] | 15 | |
| 16 | #include <adt/list.h> | |
| [ddb844e] | 17 | #include <inttypes.h> |
| [111d2d6] | 18 | #include <io/keycode.h> |
| 19 | ||
| 20 | typedef enum { | |
| 21 | KEY_PRESS, | |
| 22 | KEY_RELEASE | |
| 23 | } kbd_event_type_t; | |
| 24 | ||
| 25 | /** Console event structure. */ | |
| 26 | typedef struct { | |
| 27 | /** List handle */ | |
| 28 | link_t link; | |
| [a35b458] | 29 | |
| [111d2d6] | 30 | /** Press or release event. */ |
| 31 | kbd_event_type_t type; | |
| [a35b458] | 32 | |
| [111d2d6] | 33 | /** Keycode of the key that was pressed or released. */ |
| 34 | keycode_t key; | |
| [a35b458] | 35 | |
| [111d2d6] | 36 | /** Bitmask of modifiers held. */ |
| 37 | keymod_t mods; | |
| [a35b458] | 38 | |
| [111d2d6] | 39 | /** The character that was generated or '\0' for none. */ |
| [28a5ebd] | 40 | char32_t c; |
| [111d2d6] | 41 | } kbd_event_t; |
| 42 | ||
| 43 | #endif | |
| 44 | ||
| 45 | /** @} | |
| 46 | */ |
Note:
See TracBrowser
for help on using the repository browser.
