ttx
0.1.0
Loading...
Searching...
No Matches
key.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "di/reflect/enumerator.h"
4
#include "di/reflect/reflect.h"
5
6
// Key reference: https://sw.kovidgoyal.net/kitty/keyboard-protocol/
7
namespace
ttx
{
8
enum class
Key
{
9
None
,
10
A
,
11
B
,
12
C
,
13
D
,
14
E
,
15
F
,
16
G
,
17
H
,
18
I
,
19
J
,
20
K
,
21
L
,
22
M
,
23
N
,
24
O
,
25
P
,
26
Q
,
27
R
,
28
S
,
29
T
,
30
U
,
31
V
,
32
W
,
33
X
,
34
Y
,
35
Z
,
36
37
_0
,
38
_1
,
39
_2
,
40
_3
,
41
_4
,
42
_5
,
43
_6
,
44
_7
,
45
_8
,
46
_9
,
47
48
Backtick
,
49
Minus
,
50
Equal
,
51
Star
,
52
Plus
,
53
LeftBracket
,
54
RightBracket
,
55
BackSlash
,
56
SemiColon
,
57
Quote
,
58
Comma
,
59
Period
,
60
Slash
,
61
62
Escape
,
63
Enter
,
64
Tab
,
65
Backspace
,
66
Space
,
67
Insert
,
68
Delete
,
69
Left
,
70
Right
,
71
Up
,
72
Down
,
73
PageUp
,
74
PageDown
,
75
Home
,
76
End
,
77
CapsLock
,
78
ScrollLock
,
79
NumLock
,
80
PrintScreen
,
81
Pause
,
82
Menu
,
83
84
F1
,
85
F2
,
86
F3
,
87
F4
,
88
F5
,
89
F6
,
90
F7
,
91
F8
,
92
F9
,
93
F10
,
94
F11
,
95
F12
,
96
F13
,
97
F14
,
98
F15
,
99
F16
,
100
F17
,
101
F18
,
102
F19
,
103
F20
,
104
F21
,
105
F22
,
106
F23
,
107
F24
,
108
F25
,
109
F26
,
110
F27
,
111
F28
,
112
F29
,
113
F30
,
114
F31
,
115
F32
,
116
F33
,
117
F34
,
118
F35
,
119
120
KeyPad0
,
121
KeyPad1
,
122
KeyPad2
,
123
KeyPad3
,
124
KeyPad4
,
125
KeyPad5
,
126
KeyPad6
,
127
KeyPad7
,
128
KeyPad8
,
129
KeyPad9
,
130
KeyPadDecimal
,
131
KeyPadDivide
,
132
KeyPadMultiply
,
133
KeyPadSubtract
,
134
KeyPadAdd
,
135
KeyPadEnter
,
136
KeyPadEqual
,
137
KeyPadSeparator
,
138
KeyPadLeft
,
139
KeyPadRight
,
140
KeyPadUp
,
141
KeyPadDown
,
142
KeyPadPageUp
,
143
KeyPadPageDown
,
144
KeyPadHome
,
145
KeyPadEnd
,
146
KeyPadInsert
,
147
KeyPadDelete
,
148
KeyPadBegin
,
149
150
MediaPlay
,
151
MediaPause
,
152
MediaPlayPause
,
153
MediaReverse
,
154
MediaStop
,
155
MediaFastForward
,
156
MediaRewind
,
157
MediaTrackNext
,
158
MediaTrackPrevious
,
159
MediaRecord
,
160
LowerVolume
,
161
RaiseVolume
,
162
MuteVolume
,
163
164
ModifiersBegin
,
165
LeftShift
,
166
LeftControl
,
167
LeftAlt
,
168
LeftSuper
,
169
LeftHyper
,
170
LeftMeta
,
171
RightShift
,
172
RightControl
,
173
RightAlt
,
174
RightSuper
,
175
RightHyper
,
176
RightMeta
,
177
IsoLevel3Shift
,
178
IsoLevel5Shift
,
179
ModifiersEnd
,
180
181
KeyMax
,
182
};
183
184
constexpr
auto
tag_invoke
(di::Tag<di::reflect>, di::InPlaceType<Key>) {
185
using
enum
Key
;
186
return
di::make_enumerators<
"Key"
>(
187
di::enumerator<
"None"
,
None
>, di::enumerator<
"A"
,
A
>, di::enumerator<
"B"
,
B
>, di::enumerator<
"C"
,
C
>,
188
di::enumerator<
"D"
,
D
>, di::enumerator<
"E"
,
E
>, di::enumerator<
"F"
,
F
>, di::enumerator<
"G"
,
G
>,
189
di::enumerator<
"H"
,
H
>, di::enumerator<
"I"
,
I
>, di::enumerator<
"J"
,
J
>, di::enumerator<
"K"
,
K
>,
190
di::enumerator<
"L"
,
L
>, di::enumerator<
"M"
,
M
>, di::enumerator<
"N"
,
N
>, di::enumerator<
"O"
,
O
>,
191
di::enumerator<
"P"
,
P
>, di::enumerator<
"Q"
,
Q
>, di::enumerator<
"R"
,
R
>, di::enumerator<
"S"
,
S
>,
192
di::enumerator<
"T"
,
T
>, di::enumerator<
"U"
,
U
>, di::enumerator<
"V"
,
V
>, di::enumerator<
"W"
,
W
>,
193
di::enumerator<
"X"
,
X
>, di::enumerator<
"Y"
,
Y
>, di::enumerator<
"Z"
,
Z
>, di::enumerator<
"0"
,
_0
>,
194
di::enumerator<
"1"
,
_1
>, di::enumerator<
"2"
,
_2
>, di::enumerator<
"3"
,
_3
>, di::enumerator<
"4"
,
_4
>,
195
di::enumerator<
"5"
,
_5
>, di::enumerator<
"6"
,
_6
>, di::enumerator<
"7"
,
_7
>, di::enumerator<
"8"
,
_8
>,
196
di::enumerator<
"9"
,
_9
>, di::enumerator<
"Backtick"
,
Backtick
>, di::enumerator<
"Minus"
,
Minus
>,
197
di::enumerator<
"Equal"
,
Equal
>, di::enumerator<
"Star"
,
Star
>, di::enumerator<
"Plus"
,
Plus
>,
198
di::enumerator<
"LeftBracket"
,
LeftBracket
>, di::enumerator<
"RightBracket"
,
RightBracket
>,
199
di::enumerator<
"BackSlash"
,
BackSlash
>, di::enumerator<
"SemiColon"
,
SemiColon
>, di::enumerator<
"Quote"
,
Quote
>,
200
di::enumerator<
"Comma"
,
Comma
>, di::enumerator<
"Period"
,
Period
>, di::enumerator<
"Slash"
,
Slash
>,
201
di::enumerator<
"Escape"
,
Escape
>, di::enumerator<
"Enter"
,
Enter
>, di::enumerator<
"Tab"
,
Tab
>,
202
di::enumerator<
"Backspace"
,
Backspace
>, di::enumerator<
"Space"
,
Space
>, di::enumerator<
"Insert"
,
Insert
>,
203
di::enumerator<
"Delete"
,
Delete
>, di::enumerator<
"Left"
,
Left
>, di::enumerator<
"Right"
,
Right
>,
204
di::enumerator<
"Up"
,
Up
>, di::enumerator<
"Down"
,
Down
>);
205
}
206
}
ttx
Definition
cursor_style.h:5
ttx::Direction::None
@ None
Definition
direction.h:8
ttx::Key
Key
Definition
key.h:8
ttx::Key::F31
@ F31
Definition
key.h:114
ttx::Key::X
@ X
Definition
key.h:33
ttx::Key::KeyPadEqual
@ KeyPadEqual
Definition
key.h:136
ttx::Key::KeyPad2
@ KeyPad2
Definition
key.h:122
ttx::Key::F35
@ F35
Definition
key.h:118
ttx::Key::Down
@ Down
Definition
key.h:72
ttx::Key::KeyPad6
@ KeyPad6
Definition
key.h:126
ttx::Key::F28
@ F28
Definition
key.h:111
ttx::Key::RightSuper
@ RightSuper
Definition
key.h:174
ttx::Key::C
@ C
Definition
key.h:12
ttx::Key::Pause
@ Pause
Definition
key.h:81
ttx::Key::KeyPadAdd
@ KeyPadAdd
Definition
key.h:134
ttx::Key::MediaPlay
@ MediaPlay
Definition
key.h:150
ttx::Key::MediaPause
@ MediaPause
Definition
key.h:151
ttx::Key::Period
@ Period
Definition
key.h:59
ttx::Key::KeyPadDecimal
@ KeyPadDecimal
Definition
key.h:130
ttx::Key::MediaRewind
@ MediaRewind
Definition
key.h:156
ttx::Key::F33
@ F33
Definition
key.h:116
ttx::Key::F6
@ F6
Definition
key.h:89
ttx::Key::KeyPadSeparator
@ KeyPadSeparator
Definition
key.h:137
ttx::Key::Z
@ Z
Definition
key.h:35
ttx::Key::KeyPad8
@ KeyPad8
Definition
key.h:128
ttx::Key::KeyPadBegin
@ KeyPadBegin
Definition
key.h:148
ttx::Key::F14
@ F14
Definition
key.h:97
ttx::Key::KeyPadRight
@ KeyPadRight
Definition
key.h:139
ttx::Key::Up
@ Up
Definition
key.h:71
ttx::Key::F34
@ F34
Definition
key.h:117
ttx::Key::_2
@ _2
Definition
key.h:39
ttx::Key::Star
@ Star
Definition
key.h:51
ttx::Key::KeyPad0
@ KeyPad0
Definition
key.h:120
ttx::Key::RightShift
@ RightShift
Definition
key.h:171
ttx::Key::Plus
@ Plus
Definition
key.h:52
ttx::Key::KeyPadEnd
@ KeyPadEnd
Definition
key.h:145
ttx::Key::Slash
@ Slash
Definition
key.h:60
ttx::Key::F5
@ F5
Definition
key.h:88
ttx::Key::KeyPad7
@ KeyPad7
Definition
key.h:127
ttx::Key::E
@ E
Definition
key.h:14
ttx::Key::MediaRecord
@ MediaRecord
Definition
key.h:159
ttx::Key::BackSlash
@ BackSlash
Definition
key.h:55
ttx::Key::F32
@ F32
Definition
key.h:115
ttx::Key::P
@ P
Definition
key.h:25
ttx::Key::Minus
@ Minus
Definition
key.h:49
ttx::Key::RightBracket
@ RightBracket
Definition
key.h:54
ttx::Key::F7
@ F7
Definition
key.h:90
ttx::Key::F8
@ F8
Definition
key.h:91
ttx::Key::LeftBracket
@ LeftBracket
Definition
key.h:53
ttx::Key::F3
@ F3
Definition
key.h:86
ttx::Key::LeftSuper
@ LeftSuper
Definition
key.h:168
ttx::Key::U
@ U
Definition
key.h:30
ttx::Key::MediaStop
@ MediaStop
Definition
key.h:154
ttx::Key::V
@ V
Definition
key.h:31
ttx::Key::_7
@ _7
Definition
key.h:44
ttx::Key::F16
@ F16
Definition
key.h:99
ttx::Key::Y
@ Y
Definition
key.h:34
ttx::Key::Comma
@ Comma
Definition
key.h:58
ttx::Key::MediaReverse
@ MediaReverse
Definition
key.h:153
ttx::Key::_1
@ _1
Definition
key.h:38
ttx::Key::S
@ S
Definition
key.h:28
ttx::Key::W
@ W
Definition
key.h:32
ttx::Key::KeyPadDown
@ KeyPadDown
Definition
key.h:141
ttx::Key::RightMeta
@ RightMeta
Definition
key.h:176
ttx::Key::LeftControl
@ LeftControl
Definition
key.h:166
ttx::Key::F11
@ F11
Definition
key.h:94
ttx::Key::KeyPad5
@ KeyPad5
Definition
key.h:125
ttx::Key::M
@ M
Definition
key.h:22
ttx::Key::ModifiersEnd
@ ModifiersEnd
Definition
key.h:179
ttx::Key::F29
@ F29
Definition
key.h:112
ttx::Key::IsoLevel5Shift
@ IsoLevel5Shift
Definition
key.h:178
ttx::Key::KeyPadHome
@ KeyPadHome
Definition
key.h:144
ttx::Key::KeyPadInsert
@ KeyPadInsert
Definition
key.h:146
ttx::Key::F21
@ F21
Definition
key.h:104
ttx::Key::SemiColon
@ SemiColon
Definition
key.h:56
ttx::Key::MuteVolume
@ MuteVolume
Definition
key.h:162
ttx::Key::ScrollLock
@ ScrollLock
Definition
key.h:78
ttx::Key::KeyPadPageDown
@ KeyPadPageDown
Definition
key.h:143
ttx::Key::F22
@ F22
Definition
key.h:105
ttx::Key::A
@ A
Definition
key.h:10
ttx::Key::F
@ F
Definition
key.h:15
ttx::Key::F18
@ F18
Definition
key.h:101
ttx::Key::F30
@ F30
Definition
key.h:113
ttx::Key::RightControl
@ RightControl
Definition
key.h:172
ttx::Key::End
@ End
Definition
key.h:76
ttx::Key::F23
@ F23
Definition
key.h:106
ttx::Key::F9
@ F9
Definition
key.h:92
ttx::Key::Home
@ Home
Definition
key.h:75
ttx::Key::CapsLock
@ CapsLock
Definition
key.h:77
ttx::Key::N
@ N
Definition
key.h:23
ttx::Key::Right
@ Right
Definition
key.h:70
ttx::Key::F27
@ F27
Definition
key.h:110
ttx::Key::Left
@ Left
Definition
key.h:69
ttx::Key::F13
@ F13
Definition
key.h:96
ttx::Key::LeftAlt
@ LeftAlt
Definition
key.h:167
ttx::Key::_9
@ _9
Definition
key.h:46
ttx::Key::RightHyper
@ RightHyper
Definition
key.h:175
ttx::Key::LeftShift
@ LeftShift
Definition
key.h:165
ttx::Key::KeyMax
@ KeyMax
Definition
key.h:181
ttx::Key::PageUp
@ PageUp
Definition
key.h:73
ttx::Key::KeyPad1
@ KeyPad1
Definition
key.h:121
ttx::Key::B
@ B
Definition
key.h:11
ttx::Key::LowerVolume
@ LowerVolume
Definition
key.h:160
ttx::Key::Insert
@ Insert
Definition
key.h:67
ttx::Key::KeyPadSubtract
@ KeyPadSubtract
Definition
key.h:133
ttx::Key::K
@ K
Definition
key.h:20
ttx::Key::_0
@ _0
Definition
key.h:37
ttx::Key::LeftMeta
@ LeftMeta
Definition
key.h:170
ttx::Key::F25
@ F25
Definition
key.h:108
ttx::Key::KeyPadEnter
@ KeyPadEnter
Definition
key.h:135
ttx::Key::MediaPlayPause
@ MediaPlayPause
Definition
key.h:152
ttx::Key::RaiseVolume
@ RaiseVolume
Definition
key.h:161
ttx::Key::F10
@ F10
Definition
key.h:93
ttx::Key::_4
@ _4
Definition
key.h:41
ttx::Key::KeyPadLeft
@ KeyPadLeft
Definition
key.h:138
ttx::Key::Menu
@ Menu
Definition
key.h:82
ttx::Key::T
@ T
Definition
key.h:29
ttx::Key::IsoLevel3Shift
@ IsoLevel3Shift
Definition
key.h:177
ttx::Key::KeyPad9
@ KeyPad9
Definition
key.h:129
ttx::Key::PrintScreen
@ PrintScreen
Definition
key.h:80
ttx::Key::H
@ H
Definition
key.h:17
ttx::Key::MediaTrackPrevious
@ MediaTrackPrevious
Definition
key.h:158
ttx::Key::Quote
@ Quote
Definition
key.h:57
ttx::Key::KeyPadUp
@ KeyPadUp
Definition
key.h:140
ttx::Key::F19
@ F19
Definition
key.h:102
ttx::Key::Backspace
@ Backspace
Definition
key.h:65
ttx::Key::NumLock
@ NumLock
Definition
key.h:79
ttx::Key::L
@ L
Definition
key.h:21
ttx::Key::Space
@ Space
Definition
key.h:66
ttx::Key::RightAlt
@ RightAlt
Definition
key.h:173
ttx::Key::LeftHyper
@ LeftHyper
Definition
key.h:169
ttx::Key::MediaFastForward
@ MediaFastForward
Definition
key.h:155
ttx::Key::KeyPad3
@ KeyPad3
Definition
key.h:123
ttx::Key::_8
@ _8
Definition
key.h:45
ttx::Key::I
@ I
Definition
key.h:18
ttx::Key::_6
@ _6
Definition
key.h:43
ttx::Key::G
@ G
Definition
key.h:16
ttx::Key::F1
@ F1
Definition
key.h:84
ttx::Key::R
@ R
Definition
key.h:27
ttx::Key::F15
@ F15
Definition
key.h:98
ttx::Key::MediaTrackNext
@ MediaTrackNext
Definition
key.h:157
ttx::Key::F4
@ F4
Definition
key.h:87
ttx::Key::F12
@ F12
Definition
key.h:95
ttx::Key::KeyPad4
@ KeyPad4
Definition
key.h:124
ttx::Key::F24
@ F24
Definition
key.h:107
ttx::Key::ModifiersBegin
@ ModifiersBegin
Definition
key.h:164
ttx::Key::PageDown
@ PageDown
Definition
key.h:74
ttx::Key::KeyPadMultiply
@ KeyPadMultiply
Definition
key.h:132
ttx::Key::Backtick
@ Backtick
Definition
key.h:48
ttx::Key::Q
@ Q
Definition
key.h:26
ttx::Key::KeyPadDivide
@ KeyPadDivide
Definition
key.h:131
ttx::Key::Enter
@ Enter
Definition
key.h:63
ttx::Key::O
@ O
Definition
key.h:24
ttx::Key::Delete
@ Delete
Definition
key.h:68
ttx::Key::Equal
@ Equal
Definition
key.h:50
ttx::Key::F26
@ F26
Definition
key.h:109
ttx::Key::D
@ D
Definition
key.h:13
ttx::Key::_3
@ _3
Definition
key.h:40
ttx::Key::KeyPadDelete
@ KeyPadDelete
Definition
key.h:147
ttx::Key::F20
@ F20
Definition
key.h:103
ttx::Key::_5
@ _5
Definition
key.h:42
ttx::Key::KeyPadPageUp
@ KeyPadPageUp
Definition
key.h:142
ttx::Key::F2
@ F2
Definition
key.h:85
ttx::Key::J
@ J
Definition
key.h:19
ttx::Key::F17
@ F17
Definition
key.h:100
ttx::tag_invoke
constexpr auto tag_invoke(di::Tag< di::reflect >, di::InPlaceType< CursorStyle >)
Definition
cursor_style.h:16
ttx::Escape
Definition
escape_sequence_parser.h:68
ttx::Tab
Definition
tab.h:25
lib
include
ttx
key.h
Generated by
1.13.2