Euphoria
key.h
Go to the documentation of this file.
1 #pragma once
2 
3 
4 
5 namespace eu::core
6 {
7  enum class MouseButton
8  {
9  invalid,
10  unbound,
11  left,
12  middle,
13  right,
14  x1,
15  x2
16  };
17 
18  std::string
19  to_string(MouseButton button);
20 
22  to_mouse_button(const std::string& button);
23 
24 
25  enum class Key
26  {
27  invalid,
28  unbound,
29  return_key,
30  escape,
31  backspace,
32  tab,
33  space,
34  exclaim,
35  quotedbl,
36  hash,
37  percent,
38  dollar,
39  ampersand,
40  quote,
41  left_paren,
43  asterix,
44  plus,
45  comma,
46  minus,
47  period,
48  slash,
49  num_0,
50  num_1,
51  num_2,
52  num_3,
53  num_4,
54  num_5,
55  num_6,
56  num_7,
57  num_8,
58  num_9,
59  colon,
60  semicolon,
61  less,
62  equals,
63  greater,
64  question,
65  at,
67  backslash,
69  caret,
70  underscore,
71  backquote,
72  a,
73  b,
74  c,
75  d,
76  e,
77  f,
78  g,
79  h,
80  i,
81  j,
82  k,
83  l,
84  m,
85  n,
86  o,
87  p,
88  q,
89  r,
90  s,
91  t,
92  u,
93  v,
94  w,
95  x,
96  y,
97  z,
98  capslock,
99  f1,
100  f2,
101  f3,
102  f4,
103  f5,
104  f6,
105  f7,
106  f8,
107  f9,
108  f10,
109  f11,
110  f12,
111  print_screen,
112  scroll_lock,
113  pause,
114  insert,
115  home,
116  page_up,
117  delete_key,
118  end,
119  page_down,
120  right,
121  left,
122  down,
123  up,
127  keypad_minus,
128  keypad_plus,
129  keypad_enter,
130  keypad_1,
131  keypad_2,
132  keypad_3,
133  keypad_4,
134  keypad_5,
135  keypad_6,
136  keypad_7,
137  keypad_8,
138  keypad_9,
139  keypad_0,
141  application,
142  power,
144  f13,
145  f14,
146  f15,
147  f16,
148  f17,
149  f18,
150  f19,
151  f20,
152  f21,
153  f22,
154  f23,
155  f24,
156  execute,
157  help,
158  menu,
159  select,
160  stop,
161  again,
162  undo,
163  cut,
164  copy,
165  paste,
166  find,
167  mute,
168  volume_up,
169  volume_down,
170  keypad_comma,
172  alt_erase,
173  sysreq,
174  cancel,
175  clear,
176  prior,
178  separator,
179  out,
180  oper,
181  clear_again,
182  crsel,
183  exsel,
184  keypad_00,
185  keypad_000,
194  keypad_tab,
196  keypad_a,
197  keypad_b,
198  keypad_c,
199  keypad_d,
200  keypad_e,
201  keypad_f,
202  keypad_xor,
203  keypad_power,
205  keypad_less,
211  keypad_colon,
212  keypad_hash,
213  keypad_space,
214  keypad_at,
224  keypad_clear,
227  keypad_octal,
230  ctrl_left,
231  shift_left,
232  alt_left,
233  gui_left,
234  ctrl_right,
235  shift_right,
236  alt_right,
237  gui_right,
238  mode,
239  audio_next,
240  audio_prev,
241  audio_stop,
242  audio_play,
243  audio_mute,
244  media_select,
245  www,
246  mail,
247  calculator,
248  computer,
249  ac_search,
250  ac_home,
251  ac_back,
252  ac_forward,
253  ac_stop,
254  ac_refresh,
255  ac_bookmarks,
262  eject,
263  sleep
264  };
265 
266  std::string
267  to_string(Key k);
268 
269  Key
270  to_key(const std::string& name);
271 
272 }
273 
Key to_key(const std::string &name)
Definition: key.cc:339
std::string to_string(const EnumValue &v)
Definition: enum.cc:175
Key
Definition: key.h:26
@ keypad_double_verticle_bar
MouseButton to_mouse_button(const std::string &button)
Definition: key.cc:351
MouseButton
Definition: key.h:8