xtd - Reference Guide  0.1.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Loading...
Searching...
No Matches
console_key.h
Go to the documentation of this file.
1
4#pragma once
5#include "ustring.h"
6
8namespace xtd {
16 enum class console_key {
18 backspace = 8,
20 tab = 9,
22 clear = 12,
24 enter = 13,
26 pause = 19,
28 caps_lock = 20,
30 escape = 27,
32 spacebar = 32,
34 page_up = 33,
36 page_down = 34,
38 end = 35,
40 home = 36,
42 left_arrow = 37,
44 up_arrow = 38,
46 right_arrow = 39,
48 down_arrow = 40,
50 select = 41,
52 print = 42,
54 execute = 43,
56 print_screen = 44,
58 insert = 45,
60 del = 46,
62 help = 47,
64 d0 = 48,
66 d1 = 49,
68 d2 = 50,
70 d3 = 51,
72 d4 = 52,
74 d5 = 53,
76 d6 = 54,
78 d7 = 55,
80 d8 = 56,
82 d9 = 57,
84 a = 65,
86 b = 66,
88 c = 67,
90 d = 68,
92 e = 69,
94 f = 70,
96 g = 71,
98 h = 72,
100 i = 73,
102 j = 74,
104 k = 75,
106 l = 76,
108 m = 77,
110 n = 78,
112 o = 79,
114 p = 80,
116 q = 81,
118 r = 82,
120 s = 83,
122 t = 84,
124 u = 85,
126 v = 86,
128 w = 87,
130 x = 88,
132 y = 89,
134 z = 90,
136 left_windows = 91,
138 right_windows = 92,
140 applications = 93,
142 sleep = 95,
144 num_pad_0 = 96,
146 num_pad_1 = 97,
148 num_pad_2 = 98,
150 num_pad_3 = 99,
152 num_pad_4 = 100,
154 num_pad_5 = 101,
156 num_pad_6 = 102,
158 num_pad_7 = 103,
160 num_pad_8 = 104,
162 num_pad_9 = 105,
164 multiply = 106,
166 add = 107,
168 separator = 108,
170 subtract = 109,
172 decimal = 110,
174 divide = 111,
176 f1 = 112,
178 f2 = 113,
180 f3 = 114,
182 f4 = 115,
184 f5 = 116,
186 f6 = 117,
188 f7 = 118,
190 f8 = 119,
192 f9 = 120,
194 f10 = 121,
196 f11 = 122,
198 f12 = 123,
200 f13 = 124,
202 f14 = 125,
204 f15 = 126,
206 f16 = 127,
208 f17 = 128,
210 f18 = 129,
212 f19 = 130,
214 f20 = 131,
216 f21 = 132,
218 f22 = 133,
220 f23 = 134,
222 f24 = 135,
224 browser_back = 166,
226 browser_forward = 167,
228 browser_refresh = 168,
230 browser_stop = 169,
232 browser_search = 170,
234 browser_favorites = 171,
236 browser_home = 172,
238 volume_mute = 173,
240 volume_down = 174,
242 volume_up = 175,
244 media_next = 176,
246 media_previous = 177,
248 media_stop = 178,
250 media_play = 179,
252 launch_mail = 180,
256 launch_app1 = 182,
258 launch_app2 = 183,
260 oem1 = 186,
262 oem_plus = 187,
264 oem_comma = 188,
266 oem_minus = 189,
268 oem_period = 190,
270 oem2 = 191,
272 oem3 = 192,
274 oem4 = 219,
276 oem5 = 220,
278 oem6 = 221,
280 oem7 = 222,
282 oem8 = 223,
284 oem102 = 226,
286 process = 229,
288 packet = 231,
290 attention = 246,
292 cr_sel = 247,
294 ex_sel = 248,
296 erase_end_of_file = 249,
298 play = 250,
300 zoom = 251,
302 no_name = 252,
304 pa1 = 253,
306 oem_clear = 254
307 };
308
310 inline std::ostream& operator<<(std::ostream& os, xtd::console_key value) {return os << to_string(value, {{console_key::backspace, "backspace"}, {console_key::tab, "tab"}, {console_key::clear, "clear"}, {console_key::enter, "enter"}, {console_key::pause, "pause"}, {console_key::escape, "escape"}, {console_key::spacebar, "spacebar"}, {console_key::page_up, "page_up"}, {console_key::page_down, "page_down"}, {console_key::end, "end"}, {console_key::home, "home"}, {console_key::left_arrow, "left_arrow"}, {console_key::up_arrow, "up_arrow"}, {console_key::right_arrow, "right_arrow"}, {console_key::down_arrow, "down_arrow"}, {console_key::select, "select"}, {console_key::print, "print"}, {console_key::execute, "execute"}, {console_key::print_screen, "print_screen"}, {console_key::insert, "insert"}, {console_key::del, "del"}, {console_key::help, "help"}, {console_key::d0, "d0"}, {console_key::d1, "d1"}, {console_key::d2, "d2"}, {console_key::d3, "d3"}, {console_key::d4, "d4"}, {console_key::d5, "d5"}, {console_key::d6, "d6"}, {console_key::d7, "d7"}, {console_key::d8, "d8"}, {console_key::d9, "d9"}, {console_key::a, "a"}, {console_key::b, "b"}, {console_key::c, "c"}, {console_key::d, "d"}, {console_key::e, "e"}, {console_key::f, "f"}, {console_key::g, "g"}, {console_key::h, "h"}, {console_key::i, "i"}, {console_key::j, "j"}, {console_key::k, "k"}, {console_key::l, "l"}, {console_key::m, "m"}, {console_key::n, "n"}, {console_key::o, "o"}, {console_key::p, "p"}, {console_key::q, "q"}, {console_key::r, "r"}, {console_key::s, "s"}, {console_key::t, "t"}, {console_key::u, "u"}, {console_key::v, "v"}, {console_key::w, "w"}, {console_key::x, "x"}, {console_key::y, "y"}, {console_key::z, "z"}, {console_key::left_windows, "left_windows"}, {console_key::right_windows, "right_windows"}, {console_key::applications, "applications"}, {console_key::sleep, "sleep"}, {console_key::num_pad_0, "num_pad_0"}, {console_key::num_pad_1, "num_pad_1"}, {console_key::num_pad_2, "num_pad_2"}, {console_key::num_pad_3, "num_pad_3"}, {console_key::num_pad_4, "num_pad_4"}, {console_key::num_pad_5, "num_pad_5"}, {console_key::num_pad_6, "num_pad_6"}, {console_key::num_pad_7, "num_pad_7"}, {console_key::num_pad_8, "num_pad_8"}, {console_key::num_pad_9, "num_pad_9"}, {console_key::multiply, "multiply"}, {console_key::add, "add"}, {console_key::separator, "separator"}, {console_key::subtract, "subtract"}, {console_key::decimal, "decimal"}, {console_key::divide, "divide"}, {console_key::f1, "f1"}, {console_key::f2, "f2"}, {console_key::f3, "f3"}, {console_key::f4, "f4"}, {console_key::f5, "f5"}, {console_key::f6, "f6"}, {console_key::f7, "f7"}, {console_key::f8, "f8"}, {console_key::f9, "f9"}, {console_key::f10, "f10"}, {console_key::f11, "f11"}, {console_key::f12, "f12"}, {console_key::f13, "f13"}, {console_key::f14, "f14"}, {console_key::f15, "f15"}, {console_key::f16, "f16"}, {console_key::f17, "f17"}, {console_key::f18, "f18"}, {console_key::f19, "f19"}, {console_key::f20, "f20"}, {console_key::f21, "f21"}, {console_key::f22, "f22"}, {console_key::f23, "f23"}, {console_key::f24, "f24"}, {console_key::browser_back, "browser_back"}, {console_key::browser_forward, "browser_forward"}, {console_key::browser_refresh, "browser_refresh"}, {console_key::browser_stop, "browser_stop"}, {console_key::browser_search, "browser_search"}, {console_key::browser_favorites, "browser_favorites"}, {console_key::browser_home, "browser_home"}, {console_key::volume_mute, "volume_mute"}, {console_key::volume_down, "volume_down"}, {console_key::volume_up, "volume_up"}, {console_key::media_next, "media_next"}, {console_key::media_previous, "media_previous"}, {console_key::media_stop, "media_stop"}, {console_key::media_play, "media_play"}, {console_key::launch_mail, "launch_mail"}, {console_key::launch_media_select, "launch_media_select"}, {console_key::launch_app1, "launch_app1"}, {console_key::launch_app2, "launch_app2"}, {console_key::oem1, "oem1"}, {console_key::oem_plus, "oem_plus"}, {console_key::oem_comma, "oem_comma"}, {console_key::oem_minus, "oem_minus"}, {console_key::oem_period, "oem_period"}, {console_key::oem2, "oem2"}, {console_key::oem3, "oem3"}, {console_key::oem4, "oem4"}, {console_key::oem5, "oem5"}, {console_key::oem6, "oem6"}, {console_key::oem7, "oem7"}, {console_key::oem8, "oem8"}, {console_key::oem102, "oem102"}, {console_key::process, "process"}, {console_key::packet, "packet"}, {console_key::attention, "attention"}, {console_key::cr_sel, "cr_sel"}, {console_key::ex_sel, "ex_sel"}, {console_key::erase_end_of_file, "erase_end_of_file"}, {console_key::play, "play"}, {console_key::zoom, "zoom"}, {console_key::no_name, "no_name"}, {console_key::pa1, "pa1"}, {console_key::oem_clear, "oem_clear"}});}
311 inline std::wostream& operator<<(std::wostream& os, xtd::console_key value) {return os << to_string(value, {{console_key::backspace, L"backspace"}, {console_key::tab, L"tab"}, {console_key::clear, L"clear"}, {console_key::enter, L"enter"}, {console_key::pause, L"pause"}, {console_key::escape, L"escape"}, {console_key::spacebar, L"spacebar"}, {console_key::page_up, L"page_up"}, {console_key::page_down, L"page_down"}, {console_key::end, L"end"}, {console_key::home, L"home"}, {console_key::left_arrow, L"left_arrow"}, {console_key::up_arrow, L"up_arrow"}, {console_key::right_arrow, L"right_arrow"}, {console_key::down_arrow, L"down_arrow"}, {console_key::select, L"select"}, {console_key::print, L"print"}, {console_key::execute, L"execute"}, {console_key::print_screen, L"print_screen"}, {console_key::insert, L"insert"}, {console_key::del, L"del"}, {console_key::help, L"help"}, {console_key::d0, L"d0"}, {console_key::d1, L"d1"}, {console_key::d2, L"d2"}, {console_key::d3, L"d3"}, {console_key::d4, L"d4"}, {console_key::d5, L"d5"}, {console_key::d6, L"d6"}, {console_key::d7, L"d7"}, {console_key::d8, L"d8"}, {console_key::d9, L"d9"}, {console_key::a, L"a"}, {console_key::b, L"b"}, {console_key::c, L"c"}, {console_key::d, L"d"}, {console_key::e, L"e"}, {console_key::f, L"f"}, {console_key::g, L"g"}, {console_key::h, L"h"}, {console_key::i, L"i"}, {console_key::j, L"j"}, {console_key::k, L"k"}, {console_key::l, L"l"}, {console_key::m, L"m"}, {console_key::n, L"n"}, {console_key::o, L"o"}, {console_key::p, L"p"}, {console_key::q, L"q"}, {console_key::r, L"r"}, {console_key::s, L"s"}, {console_key::t, L"t"}, {console_key::u, L"u"}, {console_key::v, L"v"}, {console_key::w, L"w"}, {console_key::x, L"x"}, {console_key::y, L"y"}, {console_key::z, L"z"}, {console_key::left_windows, L"left_windows"}, {console_key::right_windows, L"right_windows"}, {console_key::applications, L"applications"}, {console_key::sleep, L"sleep"}, {console_key::num_pad_0, L"num_pad_0"}, {console_key::num_pad_1, L"num_pad_1"}, {console_key::num_pad_2, L"num_pad_2"}, {console_key::num_pad_3, L"num_pad_3"}, {console_key::num_pad_4, L"num_pad_4"}, {console_key::num_pad_5, L"num_pad_5"}, {console_key::num_pad_6, L"num_pad_6"}, {console_key::num_pad_7, L"num_pad_7"}, {console_key::num_pad_8, L"num_pad_8"}, {console_key::num_pad_9, L"num_pad_9"}, {console_key::multiply, L"multiply"}, {console_key::add, L"add"}, {console_key::separator, L"separator"}, {console_key::subtract, L"subtract"}, {console_key::decimal, L"decimal"}, {console_key::divide, L"divide"}, {console_key::f1, L"f1"}, {console_key::f2, L"f2"}, {console_key::f3, L"f3"}, {console_key::f4, L"f4"}, {console_key::f5, L"f5"}, {console_key::f6, L"f6"}, {console_key::f7, L"f7"}, {console_key::f8, L"f8"}, {console_key::f9, L"f9"}, {console_key::f10, L"f10"}, {console_key::f11, L"f11"}, {console_key::f12, L"f12"}, {console_key::f13, L"f13"}, {console_key::f14, L"f14"}, {console_key::f15, L"f15"}, {console_key::f16, L"f16"}, {console_key::f17, L"f17"}, {console_key::f18, L"f18"}, {console_key::f19, L"f19"}, {console_key::f20, L"f20"}, {console_key::f21, L"f21"}, {console_key::f22, L"f22"}, {console_key::f23, L"f23"}, {console_key::f24, L"f24"}, {console_key::browser_back, L"browser_back"}, {console_key::browser_forward, L"browser_forward"}, {console_key::browser_refresh, L"browser_refresh"}, {console_key::browser_stop, L"browser_stop"}, {console_key::browser_search, L"browser_search"}, {console_key::browser_favorites, L"browser_favorites"}, {console_key::browser_home, L"browser_home"}, {console_key::volume_mute, L"volume_mute"}, {console_key::volume_down, L"volume_down"}, {console_key::volume_up, L"volume_up"}, {console_key::media_next, L"media_next"}, {console_key::media_previous, L"media_previous"}, {console_key::media_stop, L"media_stop"}, {console_key::media_play, L"media_play"}, {console_key::launch_mail, L"launch_mail"}, {console_key::launch_media_select, L"launch_media_select"}, {console_key::launch_app1, L"launch_app1"}, {console_key::launch_app2, L"launch_app2"}, {console_key::oem1, L"oem1"}, {console_key::oem_plus, L"oem_plus"}, {console_key::oem_comma, L"oem_comma"}, {console_key::oem_minus, L"oem_minus"}, {console_key::oem_period, L"oem_period"}, {console_key::oem2, L"oem2"}, {console_key::oem3, L"oem3"}, {console_key::oem4, L"oem4"}, {console_key::oem5, L"oem5"}, {console_key::oem6, L"oem6"}, {console_key::oem7, L"oem7"}, {console_key::oem8, L"oem8"}, {console_key::oem102, L"oem102"}, {console_key::process, L"process"}, {console_key::packet, L"packet"}, {console_key::attention, L"attention"}, {console_key::cr_sel, L"cr_sel"}, {console_key::ex_sel, L"ex_sel"}, {console_key::erase_end_of_file, L"erase_end_of_file"}, {console_key::play, L"play"}, {console_key::zoom, L"zoom"}, {console_key::no_name, L"no_name"}, {console_key::pa1, L"pa1"}, {console_key::oem_clear, L"oem_clear"}});}
313}
decimal_t decimal
Represents a decimal-precision floating-point number.
Definition: types.h:113
std::string to_string(const value_t &value, const std::string &fmt, const std::locale &loc)
Convert a specified value into a string with specified format and locale.
Definition: to_string.h:37
console_key
Specifies the standard keys on a console.
Definition: console_key.h:16
@ clear
The CLEAR key.
@ s
The S key.
@ volume_mute
The Volume Mute key (Microsoft Natural Keyboard, Windows 2000 or later).
@ no_name
A constant reserved for future use.
@ num_pad_5
The 5 key on the numeric keypad.
@ browser_home
The Browser Home key (Windows 2000 or later).
@ browser_back
The Browser Back key (Windows 2000 or later).
@ a
The A key.
@ multiply
The Multiply key.
@ home
The HOME key.
@ media_next
The Media Next Track key (Microsoft Natural Keyboard, Windows 2000 or later).
@ f14
The F14 key.
@ d0
The 0 key.
@ zoom
The ZOOM key.
@ f3
The F3 key.
@ f22
The F22 key.
@ media_previous
The Media Previous Track key (Microsoft Natural Keyboard, Windows 2000 or later).
@ up_arrow
The UP ARROW key.
@ h
The H key.
@ browser_favorites
The Browser Favorite key (Windows 2000 or later).
@ num_pad_6
The 6 key on the numeric keypad.
@ browser_search
The Browser Search key (Windows 2000 or later).
@ oem7
The OEM 7 key (OEM specific).
@ l
The L key.
@ add
The Add key.
@ j
The J key.
@ f2
The F2 key.
@ f20
The F20 key.
@ down_arrow
The DOWN ARROW key.
@ y
The Y key.
@ browser_refresh
The Browser Refresh key (Windows 2000 or later).
@ d6
The 6 key.
@ oem4
The OEM 4 key (OEM specific).
@ c
The C key.
@ r
The R key.
@ attention
The ATTN key.
@ oem3
The OEM " key (OEM specific).
@ process
The IME PROCESS key.
@ num_pad_4
The 4 key on the numeric keypad.
@ volume_down
The Volume Down key (Microsoft Natural Keyboard, Windows 2000 or later).
@ backspace
The BACKSPACE key.
@ caps_lock
The CapsLock key.
@ f8
The F8 key.
@ print_screen
The PRINT SCREEN key.
@ f19
The F19 key.
@ launch_app2
The Start Application 2 key (Microsoft Natural Keyboard, Windows 2000 or later).
@ num_pad_8
The 8 key on the numeric keypad.
@ oem_period
The OEM Period key on any country/region keyboard (Windows 2000 or later).
@ f6
The F6 key.
@ f9
The F9 key.
@ help
The HELP key.
@ f7
The F7 key.
@ ex_sel
The EXSEL (EXTEND SELECTION) key.
@ f4
The F4 key.
@ m
The M key.
@ f5
The F5 key.
@ q
The Q key.
@ num_pad_1
The 1 key on the numeric keypad.
@ left_windows
The left Windows logo key (Microsoft Natural Keyboard).
@ u
The U key.
@ n
The N key.
@ oem2
The OEM 2 key (OEM specific).
@ end
The END key.
@ f12
The F12 key.
@ d
The D key.
@ f10
The F10 key.
@ p
The P key.
@ d8
The 8 key.
@ launch_media_select
The Select Media key (Microsoft Natural Keyboard, Windows 2000 or later).
@ i
The I key.
@ d9
The 9 key.
@ f13
The F13 key.
@ media_stop
The Media Stop key (Microsoft Natural Keyboard, Windows 2000 or later).
@ k
The K key.
@ num_pad_9
The 9 key on the numeric keypad.
@ f23
The F23 key.
@ f
The F key.
@ b
The B key.
@ divide
The Divide key.
@ subtract
The Subtract key.
@ pa1
The PA1 key.
@ d1
The 1 key.
@ select
The SELECT key.
@ volume_up
The Volume Up key (Microsoft Natural Keyboard, Windows 2000 or later).
@ erase_end_of_file
The ERASE EOF key.
@ oem_minus
The OEM Minus key on any country/region keyboard (Windows 2000 or later).
@ packet
The PACKET key (used to pass Unicode characters with keystrokes).
@ x
The X key.
@ v
The V key.
@ separator
The Separator key.
@ f16
The F16 key.
@ num_pad_2
The 2 key on the numeric keypad.
@ play
The Play key.
@ browser_stop
The Browser Stop key (Windows 2000 or later).
@ oem8
The OEM 8 key (OEM specific).
@ d4
The 4 key.
@ num_pad_7
The 7 key on the numeric keypad.
@ d2
The 2 key.
@ g
The G key.
@ launch_app1
The Start Application 1 key (Microsoft Natural Keyboard, Windows 2000 or later).
@ applications
The Application key (Microsoft Natural Keyboard).
@ launch_mail
The Start Mail key (Microsoft Natural Keyboard, Windows 2000 or later).
@ oem_clear
The CLEAR key (OEM specific).
@ d5
The 5 key.
@ cr_sel
The CRSEL (CURSOR SELECT) key.
@ f1
The F1 key.
@ decimal
The Decimal key.
@ spacebar
The SPACEBAR key.
@ media_play
The Media Play/Pause key (Microsoft Natural Keyboard, Windows 2000 or later).
@ oem_comma
The OEM Comma key on any country/region keyboard (Windows 2000 or later).
@ sleep
The Computer Sleep key.
@ num_pad_0
The 0 key on the numeric keypad.
@ del
The DEL (DELETE) key.
@ f15
The F15 key.
@ oem6
The OEM 6 key (OEM specific).
@ f18
The F18 key.
@ page_down
The PAGE DOWN key.
@ o
The O key.
@ num_pad_3
The 3 key on the numeric keypad.
@ oem1
The OEM 1 key (OEM specific).
@ insert
The INS (INSERT) key.
@ escape
The ESC (ESCAPE) key.
@ e
The E key.
@ enter
The ENTER key.
@ t
The T key.
@ oem_plus
The OEM Plus key on any country/region keyboard (Windows 2000 or later).
@ d3
The 3 key.
@ tab
The TAB key.
@ browser_forward
The Browser Forward key (Windows 2000 or later).
@ execute
The EXECUTE key.
@ pause
The PAUSE key.
@ oem102
The OEM 102 key (OEM specific).
@ w
The W key.
@ f11
The F11 key.
@ print
The PRINT key.
@ page_up
The PAGE UP key.
@ left_arrow
The LEFT ARROW key.
@ d7
The 7 key.
@ right_windows
The right Windows logo key (Microsoft Natural Keyboard).
@ oem5
The OEM 5 key (OEM specific).
@ z
The Z key.
@ f21
The F21 key.
@ f17
The F17 key.
@ right_arrow
The RIGHT ARROW key.
@ f24
The F24 key.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17
Contains xtd::ustring class.