1 // SONIC ROBO BLAST 2
2 //-----------------------------------------------------------------------------
3 // Copyright (C) 1998-2000 by DooM Legacy Team.
4 // Copyright (C) 1999-2020 by Sonic Team Junior.
5 //
6 // This program is free software distributed under the
7 // terms of the GNU General Public License, version 2.
8 // See the 'LICENSE' file for more details.
9 //-----------------------------------------------------------------------------
10 /// \file  keys.h
11 /// \brief SRB2 keyboard definition
12 
13 #ifndef __KEYS_H__
14 #define __KEYS_H__
15 
16 // These are the key codes as posted by the keyboard handler,
17 // ascii codes are 0->127,
18 // scancodes are 0x80 + 0->127
19 
20 #define KEY_NULL      0 // null key, triggers nothing
21 #define KEY_BACKSPACE 8
22 #define KEY_TAB       9
23 #define KEY_ENTER    13
24 #define KEY_ESCAPE   27
25 #define KEY_SPACE    32
26 #define KEY_MINUS    45
27 #define KEY_EQUALS   61
28 
29 #define KEY_NUMLOCK    (0x80+69)
30 #define KEY_SCROLLLOCK (0x80+70)
31 
32 //
33 //  scancodes 71-83 (non-extended)
34 //
35 #define KEY_KEYPAD7  (0x80+71)
36 #define KEY_KEYPAD8  (0x80+72)
37 #define KEY_KEYPAD9  (0x80+73)
38 #define KEY_MINUSPAD (0x80+74)
39 #define KEY_KEYPAD4  (0x80+75)
40 #define KEY_KEYPAD5  (0x80+76)
41 #define KEY_KEYPAD6  (0x80+77)
42 #define KEY_PLUSPAD  (0x80+78)
43 #define KEY_KEYPAD1  (0x80+79)
44 #define KEY_KEYPAD2  (0x80+80)
45 #define KEY_KEYPAD3  (0x80+81)
46 #define KEY_KEYPAD0  (0x80+82)
47 #define KEY_KPADDEL  (0x80+83)
48 
49 // windows95 keys
50 
51 #define KEY_LEFTWIN  (0x80+91)
52 #define KEY_RIGHTWIN (0x80+92)
53 #define KEY_MENU     (0x80+93)
54 
55 // scancodes 71-83 EXTENDED are remapped to these by the keyboard handler (just add 30)
56 #define KEY_KPADSLASH  (0x80+100) // extended scancode 53 '/' remapped
57 #define KEY_HOME       (0x80+101)
58 #define KEY_UPARROW    (0x80+102)
59 #define KEY_PGUP       (0x80+103)
60 #define KEY_LEFTARROW  (0x80+105)
61 #define KEY_RIGHTARROW (0x80+107)
62 #define KEY_END        (0x80+109)
63 #define KEY_DOWNARROW  (0x80+110)
64 #define KEY_PGDN       (0x80+111)
65 #define KEY_INS        (0x80+112)
66 #define KEY_DEL        (0x80+113)
67 
68 #define KEY_F1  (0x80+0x3b)
69 #define KEY_F2  (0x80+0x3c)
70 #define KEY_F3  (0x80+0x3d)
71 #define KEY_F4  (0x80+0x3e)
72 #define KEY_F5  (0x80+0x3f)
73 #define KEY_F6  (0x80+0x40)
74 #define KEY_F7  (0x80+0x41)
75 #define KEY_F8  (0x80+0x42)
76 #define KEY_F9  (0x80+0x43)
77 #define KEY_F10 (0x80+0x44)
78 #define KEY_F11 (0x80+0x57)
79 #define KEY_F12 (0x80+0x58)
80 
81 #define KEY_PAUSE 255
82 
83 // these ones must be non-extended scancodes (rctrl, rshift, lalt)
84 #define KEY_LSHIFT (0x80+54)
85 #define KEY_RSHIFT (0x80+55)
86 #define KEY_LCTRL  (0x80+29)
87 #define KEY_RCTRL  (0x80+30)
88 #define KEY_LALT   (0x80+56)
89 #define KEY_RALT   (0x80+57)
90 
91 #define KEY_CAPSLOCK (0x80+58)
92 #define KEY_CONSOLE  '`'
93 
94 #define KEY_OPENBRACKETS
95 #define KEY_CLOSEBRACKETS
96 
97 #endif
98