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