1.10
include
egt
keycode.h
1
/*
2
* Copyright (C) 2018 Microchip Technology Inc. All rights reserved.
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
#ifndef EGT_KEYCODE_H
7
#define EGT_KEYCODE_H
8
9
#include <cstdint>
10
#include <egt/detail/meta.h>
11
17
namespace
egt
18
{
19
inline
namespace
v1
20
{
21
25
enum
KeyboardCode
26
{
27
EKEY_UNKNOWN
= 0,
28
EKEY_BACKSPACE
= 0x08,
29
EKEY_TAB
= 0x09,
30
EKEY_CLEAR
= 0x0C,
31
EKEY_ENTER
= 0x0D,
32
EKEY_MENU
= 0x12,
33
EKEY_PAUSE
= 0x13,
34
EKEY_CAPSLOCK
= 0x14,
35
EKEY_SNAPSHOT
= 0x15,
36
EKEY_ESCAPE
= 0x1B,
37
EKEY_NEXT
= 0x1E,
38
EKEY_SPACE
= 0x20,
39
EKEY_PAGEUP
= 0x21,
40
EKEY_PAGEDOWN
= 0x22,
41
EKEY_END
= 0x23,
42
EKEY_HOME
= 0x24,
43
EKEY_LEFT
= 0x25,
44
EKEY_UP
= 0x26,
45
EKEY_RIGHT
= 0x27,
46
EKEY_DOWN
= 0x28,
47
EKEY_SELECT
= 0x29,
48
EKEY_PRINT
= 0x2A,
49
EKEY_INSERT
= 0x2D,
50
EKEY_DELETE
= 0x2E,
51
EKEY_HELP
= 0x2F,
52
EKEY_0
= 0x30,
53
EKEY_1
= 0x31,
54
EKEY_2
= 0x32,
55
EKEY_3
= 0x33,
56
EKEY_4
= 0x34,
57
EKEY_5
= 0x35,
58
EKEY_6
= 0x36,
59
EKEY_7
= 0x37,
60
EKEY_8
= 0x38,
61
EKEY_9
= 0x39,
62
EKEY_A
= 0x41,
63
EKEY_B
= 0x42,
64
EKEY_C
= 0x43,
65
EKEY_D
= 0x44,
66
EKEY_E
= 0x45,
67
EKEY_F
= 0x46,
68
EKEY_G
= 0x47,
69
EKEY_H
= 0x48,
70
EKEY_I
= 0x49,
71
EKEY_J
= 0x4A,
72
EKEY_K
= 0x4B,
73
EKEY_L
= 0x4C,
74
EKEY_M
= 0x4D,
75
EKEY_N
= 0x4E,
76
EKEY_O
= 0x4F,
77
EKEY_P
= 0x50,
78
EKEY_Q
= 0x51,
79
EKEY_R
= 0x52,
80
EKEY_S
= 0x53,
81
EKEY_T
= 0x54,
82
EKEY_U
= 0x55,
83
EKEY_V
= 0x56,
84
EKEY_W
= 0x57,
85
EKEY_X
= 0x58,
86
EKEY_Y
= 0x59,
87
EKEY_Z
= 0x5A,
88
EKEY_SLEEP
= 0x5F,
89
EKEY_NUMPAD0
= 0x60,
90
EKEY_NUMPAD1
= 0x61,
91
EKEY_NUMPAD2
= 0x62,
92
EKEY_NUMPAD3
= 0x63,
93
EKEY_NUMPAD4
= 0x64,
94
EKEY_NUMPAD5
= 0x65,
95
EKEY_NUMPAD6
= 0x66,
96
EKEY_NUMPAD7
= 0x67,
97
EKEY_NUMPAD8
= 0x68,
98
EKEY_NUMPAD9
= 0x69,
99
EKEY_MULTIPLY
= 0x6A,
100
EKEY_ADD
= 0x6B,
101
EKEY_KPENTER
= 0x6C,
102
EKEY_SUBTRACT
= 0x6D,
103
EKEY_DECIMAL
= 0x6E,
104
EKEY_DIVIDE
= 0x6F,
105
EKEY_F1
= 0x70,
106
EKEY_F2
= 0x71,
107
EKEY_F3
= 0x72,
108
EKEY_F4
= 0x73,
109
EKEY_F5
= 0x74,
110
EKEY_F6
= 0x75,
111
EKEY_F7
= 0x76,
112
EKEY_F8
= 0x77,
113
EKEY_F9
= 0x78,
114
EKEY_F10
= 0x79,
115
EKEY_F11
= 0x7A,
116
EKEY_F12
= 0x7B,
117
EKEY_F13
= 0x7C,
118
EKEY_F14
= 0x7D,
119
EKEY_F15
= 0x7E,
120
EKEY_F16
= 0x7F,
121
EKEY_F17
= 0x80,
122
EKEY_F18
= 0x81,
123
EKEY_F19
= 0x82,
124
EKEY_F20
= 0x83,
125
EKEY_F21
= 0x84,
126
EKEY_F22
= 0x85,
127
EKEY_F23
= 0x86,
128
EKEY_F24
= 0x87,
129
EKEY_NUMLOCK
= 0x90,
130
EKEY_SCROLL
= 0x91,
131
EKEY_LSHIFT
= 0xA0,
132
EKEY_RSHIFT
= 0xA1,
133
EKEY_LCONTROL
= 0xA2,
134
EKEY_RCONTROL
= 0xA3,
135
EKEY_LEFTALT
= 0xA4,
136
EKEY_RIGHTALT
= 0xA5,
137
EKEY_VOLUME_MUTE
= 0xAD,
138
EKEY_VOLUME_DOWN
= 0xAE,
139
EKEY_VOLUME_UP
= 0xAF,
140
EKEY_PLUS
= 0xBB,
141
EKEY_COMMA
= 0xBC,
142
EKEY_MINUS
= 0xBD,
143
EKEY_DOT
= 0xBE,
144
EKEY_NUMDOT
= 0xBF,
145
EKEY_SLASH
= 0xC0,
146
EKEY_SEMICOLON
= 0xDB,
147
EKEY_APOSTROPHE
= 0xDC,
148
EKEY_LEFTBRACE
= 0xDD,
149
EKEY_RIGHTBRACE
= 0xDE,
150
EKEY_EQUAL
= 0xDF,
151
EKEY_GRAVE
= 0xE2,
152
EKEY_BACKSLASH
= 0xE3,
153
EKEY_PLAY
= 0xFA,
154
EKEY_ZOOM
= 0xFB,
155
EKEY_WLAN
= 0x97,
156
EKEY_POWER
= 0x98,
157
EKEY_COMPOSE
= 0xE6,
158
EKEY_USER1
= 0x104,
159
};
160
161
namespace
detail
162
{
163
167
EGT_API
KeyboardCode
linux_to_ekey
(
int
code);
168
169
}
170
171
}
172
}
173
174
#endif
egt::v1::detail::linux_to_ekey
EGT_API KeyboardCode linux_to_ekey(int code)
Map a Linux key code to an EKEY.
egt::v1::KeyboardCode
KeyboardCode
Key codes that represent a physical key.
Definition
keycode.h:26
egt::v1::EKEY_ADD
@ EKEY_ADD
Definition
keycode.h:100
egt::v1::EKEY_SLASH
@ EKEY_SLASH
Definition
keycode.h:145
egt::v1::EKEY_J
@ EKEY_J
Definition
keycode.h:71
egt::v1::EKEY_F18
@ EKEY_F18
Definition
keycode.h:122
egt::v1::EKEY_BACKSPACE
@ EKEY_BACKSPACE
Definition
keycode.h:28
egt::v1::EKEY_NUMPAD9
@ EKEY_NUMPAD9
Definition
keycode.h:98
egt::v1::EKEY_F20
@ EKEY_F20
Definition
keycode.h:124
egt::v1::EKEY_C
@ EKEY_C
Definition
keycode.h:64
egt::v1::EKEY_MENU
@ EKEY_MENU
Definition
keycode.h:32
egt::v1::EKEY_2
@ EKEY_2
Definition
keycode.h:54
egt::v1::EKEY_1
@ EKEY_1
Definition
keycode.h:53
egt::v1::EKEY_F11
@ EKEY_F11
Definition
keycode.h:115
egt::v1::EKEY_F12
@ EKEY_F12
Definition
keycode.h:116
egt::v1::EKEY_CLEAR
@ EKEY_CLEAR
Definition
keycode.h:30
egt::v1::EKEY_R
@ EKEY_R
Definition
keycode.h:79
egt::v1::EKEY_VOLUME_MUTE
@ EKEY_VOLUME_MUTE
Definition
keycode.h:137
egt::v1::EKEY_POWER
@ EKEY_POWER
Definition
keycode.h:156
egt::v1::EKEY_3
@ EKEY_3
Definition
keycode.h:55
egt::v1::EKEY_S
@ EKEY_S
Definition
keycode.h:80
egt::v1::EKEY_6
@ EKEY_6
Definition
keycode.h:58
egt::v1::EKEY_SPACE
@ EKEY_SPACE
Definition
keycode.h:38
egt::v1::EKEY_NUMDOT
@ EKEY_NUMDOT
Definition
keycode.h:144
egt::v1::EKEY_SCROLL
@ EKEY_SCROLL
Definition
keycode.h:130
egt::v1::EKEY_HELP
@ EKEY_HELP
Definition
keycode.h:51
egt::v1::EKEY_M
@ EKEY_M
Definition
keycode.h:74
egt::v1::EKEY_F19
@ EKEY_F19
Definition
keycode.h:123
egt::v1::EKEY_F4
@ EKEY_F4
Definition
keycode.h:108
egt::v1::EKEY_NEXT
@ EKEY_NEXT
Definition
keycode.h:37
egt::v1::EKEY_F10
@ EKEY_F10
Definition
keycode.h:114
egt::v1::EKEY_COMPOSE
@ EKEY_COMPOSE
Definition
keycode.h:157
egt::v1::EKEY_RIGHTBRACE
@ EKEY_RIGHTBRACE
Definition
keycode.h:149
egt::v1::EKEY_PAGEDOWN
@ EKEY_PAGEDOWN
Definition
keycode.h:40
egt::v1::EKEY_DELETE
@ EKEY_DELETE
Definition
keycode.h:50
egt::v1::EKEY_7
@ EKEY_7
Definition
keycode.h:59
egt::v1::EKEY_V
@ EKEY_V
Definition
keycode.h:83
egt::v1::EKEY_NUMPAD3
@ EKEY_NUMPAD3
Definition
keycode.h:92
egt::v1::EKEY_I
@ EKEY_I
Definition
keycode.h:70
egt::v1::EKEY_ENTER
@ EKEY_ENTER
Definition
keycode.h:31
egt::v1::EKEY_P
@ EKEY_P
Definition
keycode.h:77
egt::v1::EKEY_LCONTROL
@ EKEY_LCONTROL
Definition
keycode.h:133
egt::v1::EKEY_F1
@ EKEY_F1
Definition
keycode.h:105
egt::v1::EKEY_F2
@ EKEY_F2
Definition
keycode.h:106
egt::v1::EKEY_L
@ EKEY_L
Definition
keycode.h:73
egt::v1::EKEY_INSERT
@ EKEY_INSERT
Definition
keycode.h:49
egt::v1::EKEY_5
@ EKEY_5
Definition
keycode.h:57
egt::v1::EKEY_F
@ EKEY_F
Definition
keycode.h:67
egt::v1::EKEY_APOSTROPHE
@ EKEY_APOSTROPHE
Definition
keycode.h:147
egt::v1::EKEY_ZOOM
@ EKEY_ZOOM
Definition
keycode.h:154
egt::v1::EKEY_UP
@ EKEY_UP
Definition
keycode.h:44
egt::v1::EKEY_Z
@ EKEY_Z
Definition
keycode.h:87
egt::v1::EKEY_SUBTRACT
@ EKEY_SUBTRACT
Definition
keycode.h:102
egt::v1::EKEY_USER1
@ EKEY_USER1
Definition
keycode.h:158
egt::v1::EKEY_F7
@ EKEY_F7
Definition
keycode.h:111
egt::v1::EKEY_UNKNOWN
@ EKEY_UNKNOWN
Definition
keycode.h:27
egt::v1::EKEY_RIGHTALT
@ EKEY_RIGHTALT
Definition
keycode.h:136
egt::v1::EKEY_GRAVE
@ EKEY_GRAVE
Definition
keycode.h:151
egt::v1::EKEY_SLEEP
@ EKEY_SLEEP
Definition
keycode.h:88
egt::v1::EKEY_F14
@ EKEY_F14
Definition
keycode.h:118
egt::v1::EKEY_NUMPAD7
@ EKEY_NUMPAD7
Definition
keycode.h:96
egt::v1::EKEY_F24
@ EKEY_F24
Definition
keycode.h:128
egt::v1::EKEY_0
@ EKEY_0
Definition
keycode.h:52
egt::v1::EKEY_PLAY
@ EKEY_PLAY
Definition
keycode.h:153
egt::v1::EKEY_F13
@ EKEY_F13
Definition
keycode.h:117
egt::v1::EKEY_DECIMAL
@ EKEY_DECIMAL
Definition
keycode.h:103
egt::v1::EKEY_W
@ EKEY_W
Definition
keycode.h:84
egt::v1::EKEY_X
@ EKEY_X
Definition
keycode.h:85
egt::v1::EKEY_NUMLOCK
@ EKEY_NUMLOCK
Definition
keycode.h:129
egt::v1::EKEY_D
@ EKEY_D
Definition
keycode.h:65
egt::v1::EKEY_F15
@ EKEY_F15
Definition
keycode.h:119
egt::v1::EKEY_RCONTROL
@ EKEY_RCONTROL
Definition
keycode.h:134
egt::v1::EKEY_SEMICOLON
@ EKEY_SEMICOLON
Definition
keycode.h:146
egt::v1::EKEY_LEFTBRACE
@ EKEY_LEFTBRACE
Definition
keycode.h:148
egt::v1::EKEY_TAB
@ EKEY_TAB
Definition
keycode.h:29
egt::v1::EKEY_NUMPAD6
@ EKEY_NUMPAD6
Definition
keycode.h:95
egt::v1::EKEY_B
@ EKEY_B
Definition
keycode.h:63
egt::v1::EKEY_T
@ EKEY_T
Definition
keycode.h:81
egt::v1::EKEY_COMMA
@ EKEY_COMMA
Definition
keycode.h:141
egt::v1::EKEY_F3
@ EKEY_F3
Definition
keycode.h:107
egt::v1::EKEY_Y
@ EKEY_Y
Definition
keycode.h:86
egt::v1::EKEY_RIGHT
@ EKEY_RIGHT
Definition
keycode.h:45
egt::v1::EKEY_K
@ EKEY_K
Definition
keycode.h:72
egt::v1::EKEY_ESCAPE
@ EKEY_ESCAPE
Definition
keycode.h:36
egt::v1::EKEY_F5
@ EKEY_F5
Definition
keycode.h:109
egt::v1::EKEY_NUMPAD2
@ EKEY_NUMPAD2
Definition
keycode.h:91
egt::v1::EKEY_F17
@ EKEY_F17
Definition
keycode.h:121
egt::v1::EKEY_LSHIFT
@ EKEY_LSHIFT
Definition
keycode.h:131
egt::v1::EKEY_A
@ EKEY_A
Definition
keycode.h:62
egt::v1::EKEY_DOT
@ EKEY_DOT
Definition
keycode.h:143
egt::v1::EKEY_MULTIPLY
@ EKEY_MULTIPLY
Definition
keycode.h:99
egt::v1::EKEY_WLAN
@ EKEY_WLAN
Definition
keycode.h:155
egt::v1::EKEY_MINUS
@ EKEY_MINUS
Definition
keycode.h:142
egt::v1::EKEY_NUMPAD0
@ EKEY_NUMPAD0
Definition
keycode.h:89
egt::v1::EKEY_EQUAL
@ EKEY_EQUAL
Definition
keycode.h:150
egt::v1::EKEY_F21
@ EKEY_F21
Definition
keycode.h:125
egt::v1::EKEY_VOLUME_DOWN
@ EKEY_VOLUME_DOWN
Definition
keycode.h:138
egt::v1::EKEY_DOWN
@ EKEY_DOWN
Definition
keycode.h:46
egt::v1::EKEY_Q
@ EKEY_Q
Definition
keycode.h:78
egt::v1::EKEY_NUMPAD4
@ EKEY_NUMPAD4
Definition
keycode.h:93
egt::v1::EKEY_BACKSLASH
@ EKEY_BACKSLASH
Definition
keycode.h:152
egt::v1::EKEY_LEFT
@ EKEY_LEFT
Definition
keycode.h:43
egt::v1::EKEY_NUMPAD1
@ EKEY_NUMPAD1
Definition
keycode.h:90
egt::v1::EKEY_HOME
@ EKEY_HOME
Definition
keycode.h:42
egt::v1::EKEY_KPENTER
@ EKEY_KPENTER
Definition
keycode.h:101
egt::v1::EKEY_F9
@ EKEY_F9
Definition
keycode.h:113
egt::v1::EKEY_LEFTALT
@ EKEY_LEFTALT
Definition
keycode.h:135
egt::v1::EKEY_8
@ EKEY_8
Definition
keycode.h:60
egt::v1::EKEY_END
@ EKEY_END
Definition
keycode.h:41
egt::v1::EKEY_F22
@ EKEY_F22
Definition
keycode.h:126
egt::v1::EKEY_4
@ EKEY_4
Definition
keycode.h:56
egt::v1::EKEY_F8
@ EKEY_F8
Definition
keycode.h:112
egt::v1::EKEY_F23
@ EKEY_F23
Definition
keycode.h:127
egt::v1::EKEY_VOLUME_UP
@ EKEY_VOLUME_UP
Definition
keycode.h:139
egt::v1::EKEY_F16
@ EKEY_F16
Definition
keycode.h:120
egt::v1::EKEY_PRINT
@ EKEY_PRINT
Definition
keycode.h:48
egt::v1::EKEY_O
@ EKEY_O
Definition
keycode.h:76
egt::v1::EKEY_CAPSLOCK
@ EKEY_CAPSLOCK
Definition
keycode.h:34
egt::v1::EKEY_NUMPAD8
@ EKEY_NUMPAD8
Definition
keycode.h:97
egt::v1::EKEY_G
@ EKEY_G
Definition
keycode.h:68
egt::v1::EKEY_DIVIDE
@ EKEY_DIVIDE
Definition
keycode.h:104
egt::v1::EKEY_SNAPSHOT
@ EKEY_SNAPSHOT
Definition
keycode.h:35
egt::v1::EKEY_PLUS
@ EKEY_PLUS
Definition
keycode.h:140
egt::v1::EKEY_SELECT
@ EKEY_SELECT
Definition
keycode.h:47
egt::v1::EKEY_9
@ EKEY_9
Definition
keycode.h:61
egt::v1::EKEY_E
@ EKEY_E
Definition
keycode.h:66
egt::v1::EKEY_U
@ EKEY_U
Definition
keycode.h:82
egt::v1::EKEY_PAUSE
@ EKEY_PAUSE
Definition
keycode.h:33
egt::v1::EKEY_NUMPAD5
@ EKEY_NUMPAD5
Definition
keycode.h:94
egt::v1::EKEY_RSHIFT
@ EKEY_RSHIFT
Definition
keycode.h:132
egt::v1::EKEY_PAGEUP
@ EKEY_PAGEUP
Definition
keycode.h:39
egt::v1::EKEY_H
@ EKEY_H
Definition
keycode.h:69
egt::v1::EKEY_N
@ EKEY_N
Definition
keycode.h:75
egt::v1::EKEY_F6
@ EKEY_F6
Definition
keycode.h:110
egt
EGT framework namespace.
Definition
animation.h:24