28 #define DEFINE_KEYBD_BUTTON_HANDLE(KeyName) \ 29 static ButtonHandle _##KeyName; \ 30 ButtonHandle KeyboardButton::KeyName() { return _##KeyName; } 32 DEFINE_KEYBD_BUTTON_HANDLE(space)
33 DEFINE_KEYBD_BUTTON_HANDLE(backspace)
34 DEFINE_KEYBD_BUTTON_HANDLE(tab)
35 DEFINE_KEYBD_BUTTON_HANDLE(enter)
36 DEFINE_KEYBD_BUTTON_HANDLE(escape)
37 DEFINE_KEYBD_BUTTON_HANDLE(f1)
38 DEFINE_KEYBD_BUTTON_HANDLE(f2)
39 DEFINE_KEYBD_BUTTON_HANDLE(f3)
40 DEFINE_KEYBD_BUTTON_HANDLE(f4)
41 DEFINE_KEYBD_BUTTON_HANDLE(f5)
42 DEFINE_KEYBD_BUTTON_HANDLE(f6)
43 DEFINE_KEYBD_BUTTON_HANDLE(f7)
44 DEFINE_KEYBD_BUTTON_HANDLE(f8)
45 DEFINE_KEYBD_BUTTON_HANDLE(f9)
46 DEFINE_KEYBD_BUTTON_HANDLE(f10)
47 DEFINE_KEYBD_BUTTON_HANDLE(f11)
48 DEFINE_KEYBD_BUTTON_HANDLE(f12)
49 DEFINE_KEYBD_BUTTON_HANDLE(f13)
50 DEFINE_KEYBD_BUTTON_HANDLE(f14)
51 DEFINE_KEYBD_BUTTON_HANDLE(f15)
52 DEFINE_KEYBD_BUTTON_HANDLE(f16)
53 DEFINE_KEYBD_BUTTON_HANDLE(left)
54 DEFINE_KEYBD_BUTTON_HANDLE(right)
55 DEFINE_KEYBD_BUTTON_HANDLE(up)
56 DEFINE_KEYBD_BUTTON_HANDLE(down)
57 DEFINE_KEYBD_BUTTON_HANDLE(page_up)
58 DEFINE_KEYBD_BUTTON_HANDLE(page_down)
59 DEFINE_KEYBD_BUTTON_HANDLE(home)
60 DEFINE_KEYBD_BUTTON_HANDLE(end)
61 DEFINE_KEYBD_BUTTON_HANDLE(insert)
62 DEFINE_KEYBD_BUTTON_HANDLE(del)
63 DEFINE_KEYBD_BUTTON_HANDLE(help)
64 DEFINE_KEYBD_BUTTON_HANDLE(meta)
65 DEFINE_KEYBD_BUTTON_HANDLE(caps_lock)
66 DEFINE_KEYBD_BUTTON_HANDLE(shift_lock)
67 DEFINE_KEYBD_BUTTON_HANDLE(scroll_lock)
68 DEFINE_KEYBD_BUTTON_HANDLE(num_lock)
69 DEFINE_KEYBD_BUTTON_HANDLE(print_screen)
70 DEFINE_KEYBD_BUTTON_HANDLE(pause)
71 DEFINE_KEYBD_BUTTON_HANDLE(menu)
72 DEFINE_KEYBD_BUTTON_HANDLE(shift)
73 DEFINE_KEYBD_BUTTON_HANDLE(control)
74 DEFINE_KEYBD_BUTTON_HANDLE(alt)
75 DEFINE_KEYBD_BUTTON_HANDLE(lshift)
76 DEFINE_KEYBD_BUTTON_HANDLE(rshift)
77 DEFINE_KEYBD_BUTTON_HANDLE(lcontrol)
78 DEFINE_KEYBD_BUTTON_HANDLE(rcontrol)
79 DEFINE_KEYBD_BUTTON_HANDLE(lalt)
80 DEFINE_KEYBD_BUTTON_HANDLE(ralt)
81 DEFINE_KEYBD_BUTTON_HANDLE(lmeta)
82 DEFINE_KEYBD_BUTTON_HANDLE(rmeta)
92 ButtonHandle::none(),
' ');
94 ButtonHandle::none(),
'\x08');
96 ButtonHandle::none(),
'\x09');
98 ButtonHandle::none(),
'\x0d');
100 ButtonHandle::none(),
'\x1b');
102 ButtonHandle::none(),
'\x7f');
155 for (
int i = 32; i < 127; i++) {
159 ButtonHandle::none(), i);