OpenTTD

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

cocoa_keys.h
Go to the documentation of this file.
1 /* $Id: cocoa_keys.h 17248 2009-08-21 20:21:05Z rubidium $ */
2
3 /*
4 * This file is part of OpenTTD.
5 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
6 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
8 */
9
12 #ifndef COCOA_KEYS_H
13 #define COCOA_KEYS_H
14
15 /* From SDL_QuartzKeys.h
16 * These are the Macintosh key scancode constants -- from Inside Macintosh */
17
18 #define QZ_ESCAPE 0x35
19 #define QZ_F1 0x7A
20 #define QZ_F2 0x78
21 #define QZ_F3 0x63
22 #define QZ_F4 0x76
23 #define QZ_F5 0x60
24 #define QZ_F6 0x61
25 #define QZ_F7 0x62
26 #define QZ_F8 0x64
27 #define QZ_F9 0x65
28 #define QZ_F10 0x6D
29 #define QZ_F11 0x67
30 #define QZ_F12 0x6F
31 #define QZ_PRINT 0x69
32 #define QZ_SCROLLOCK 0x6B
33 #define QZ_PAUSE 0x71
34 #define QZ_POWER 0x7F
35 #define QZ_BACKQUOTE 0x0A
36 #define QZ_BACKQUOTE2 0x32
37 #define QZ_1 0x12
38 #define QZ_2 0x13
39 #define QZ_3 0x14
40 #define QZ_4 0x15
41 #define QZ_5 0x17
42 #define QZ_6 0x16
43 #define QZ_7 0x1A
44 #define QZ_8 0x1C
45 #define QZ_9 0x19
46 #define QZ_0 0x1D
47 #define QZ_MINUS 0x1B
48 #define QZ_EQUALS 0x18
49 #define QZ_BACKSPACE 0x33
50 #define QZ_INSERT 0x72
51 #define QZ_HOME 0x73
52 #define QZ_PAGEUP 0x74
53 #define QZ_NUMLOCK 0x47
54 #define QZ_KP_EQUALS 0x51
55 #define QZ_KP_DIVIDE 0x4B
56 #define QZ_KP_MULTIPLY 0x43
57 #define QZ_TAB 0x30
58 #define QZ_q 0x0C
59 #define QZ_w 0x0D
60 #define QZ_e 0x0E
61 #define QZ_r 0x0F
62 #define QZ_t 0x11
63 #define QZ_y 0x10
64 #define QZ_u 0x20
65 #define QZ_i 0x22
66 #define QZ_o 0x1F
67 #define QZ_p 0x23
68 #define QZ_LEFTBRACKET 0x21
69 #define QZ_RIGHTBRACKET 0x1E
70 #define QZ_BACKSLASH 0x2A
71 #define QZ_DELETE 0x75
72 #define QZ_END 0x77
73 #define QZ_PAGEDOWN 0x79
74 #define QZ_KP7 0x59
75 #define QZ_KP8 0x5B
76 #define QZ_KP9 0x5C
77 #define QZ_KP_MINUS 0x4E
78 #define QZ_CAPSLOCK 0x39
79 #define QZ_a 0x00
80 #define QZ_s 0x01
81 #define QZ_d 0x02
82 #define QZ_f 0x03
83 #define QZ_g 0x05
84 #define QZ_h 0x04
85 #define QZ_j 0x26
86 #define QZ_k 0x28
87 #define QZ_l 0x25
88 #define QZ_SEMICOLON 0x29
89 #define QZ_QUOTE 0x27
90 #define QZ_RETURN 0x24
91 #define QZ_KP4 0x56
92 #define QZ_KP5 0x57
93 #define QZ_KP6 0x58
94 #define QZ_KP_PLUS 0x45
95 #define QZ_LSHIFT 0x38
96 #define QZ_z 0x06
97 #define QZ_x 0x07
98 #define QZ_c 0x08
99 #define QZ_v 0x09
100 #define QZ_b 0x0B
101 #define QZ_n 0x2D
102 #define QZ_m 0x2E
103 #define QZ_COMMA 0x2B
104 #define QZ_PERIOD 0x2F
105 #define QZ_SLASH 0x2C
106 #if 1 /* Panther now defines right side keys */
107 #define QZ_RSHIFT 0x3C
108 #endif
109 #define QZ_UP 0x7E
110 #define QZ_KP1 0x53
111 #define QZ_KP2 0x54
112 #define QZ_KP3 0x55
113 #define QZ_KP_ENTER 0x4C
114 #define QZ_LCTRL 0x3B
115 #define QZ_LALT 0x3A
116 #define QZ_LMETA 0x37
117 #define QZ_SPACE 0x31
118 #if 1 /* Panther now defines right side keys */
119 #define QZ_RMETA 0x36
120 #define QZ_RALT 0x3D
121 #define QZ_RCTRL 0x3E
122 #endif
123 #define QZ_LEFT 0x7B
124 #define QZ_DOWN 0x7D
125 #define QZ_RIGHT 0x7C
126 #define QZ_KP0 0x52
127 #define QZ_KP_PERIOD 0x41
128
129 /* Wierd, these keys are on my iBook under MacOS X */
130 #define QZ_IBOOK_ENTER 0x34
131 #define QZ_IBOOK_LEFT 0x3B
132 #define QZ_IBOOK_RIGHT 0x3C
133 #define QZ_IBOOK_DOWN 0x3D
134 #define QZ_IBOOK_UP 0x3E
135
136 #endif