# cocoa_keys.h

Go to the documentation of this file.

    00001 /* $Id: cocoa_keys.h 17248 2009-08-21 20:21:05Z rubidium $ */
    00002
    00003 /*
    00004  * This file is part of OpenTTD.
    00005  * 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.
    00006  * 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.
    00007  * 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/>.
    00008  */
    00009
    00012 #ifndef COCOA_KEYS_H
    00013 #define COCOA_KEYS_H
    00014
    00015 /* From SDL_QuartzKeys.h
    00016  * These are the Macintosh key scancode constants -- from Inside Macintosh */
    00017
    00018 #define QZ_ESCAPE       0x35
    00019 #define QZ_F1           0x7A
    00020 #define QZ_F2           0x78
    00021 #define QZ_F3           0x63
    00022 #define QZ_F4           0x76
    00023 #define QZ_F5           0x60
    00024 #define QZ_F6           0x61
    00025 #define QZ_F7           0x62
    00026 #define QZ_F8           0x64
    00027 #define QZ_F9           0x65
    00028 #define QZ_F10          0x6D
    00029 #define QZ_F11          0x67
    00030 #define QZ_F12          0x6F
    00031 #define QZ_PRINT        0x69
    00032 #define QZ_SCROLLOCK    0x6B
    00033 #define QZ_PAUSE        0x71
    00034 #define QZ_POWER        0x7F
    00035 #define QZ_BACKQUOTE    0x0A
    00036 #define QZ_BACKQUOTE2   0x32
    00037 #define QZ_1            0x12
    00038 #define QZ_2            0x13
    00039 #define QZ_3            0x14
    00040 #define QZ_4            0x15
    00041 #define QZ_5            0x17
    00042 #define QZ_6            0x16
    00043 #define QZ_7            0x1A
    00044 #define QZ_8            0x1C
    00045 #define QZ_9            0x19
    00046 #define QZ_0            0x1D
    00047 #define QZ_MINUS        0x1B
    00048 #define QZ_EQUALS       0x18
    00049 #define QZ_BACKSPACE    0x33
    00050 #define QZ_INSERT       0x72
    00051 #define QZ_HOME         0x73
    00052 #define QZ_PAGEUP       0x74
    00053 #define QZ_NUMLOCK      0x47
    00054 #define QZ_KP_EQUALS    0x51
    00055 #define QZ_KP_DIVIDE    0x4B
    00056 #define QZ_KP_MULTIPLY  0x43
    00057 #define QZ_TAB          0x30
    00058 #define QZ_q            0x0C
    00059 #define QZ_w            0x0D
    00060 #define QZ_e            0x0E
    00061 #define QZ_r            0x0F
    00062 #define QZ_t            0x11
    00063 #define QZ_y            0x10
    00064 #define QZ_u            0x20
    00065 #define QZ_i            0x22
    00066 #define QZ_o            0x1F
    00067 #define QZ_p            0x23
    00068 #define QZ_LEFTBRACKET  0x21
    00069 #define QZ_RIGHTBRACKET 0x1E
    00070 #define QZ_BACKSLASH    0x2A
    00071 #define QZ_DELETE       0x75
    00072 #define QZ_END          0x77
    00073 #define QZ_PAGEDOWN     0x79
    00074 #define QZ_KP7          0x59
    00075 #define QZ_KP8          0x5B
    00076 #define QZ_KP9          0x5C
    00077 #define QZ_KP_MINUS     0x4E
    00078 #define QZ_CAPSLOCK     0x39
    00079 #define QZ_a            0x00
    00080 #define QZ_s            0x01
    00081 #define QZ_d            0x02
    00082 #define QZ_f            0x03
    00083 #define QZ_g            0x05
    00084 #define QZ_h            0x04
    00085 #define QZ_j            0x26
    00086 #define QZ_k            0x28
    00087 #define QZ_l            0x25
    00088 #define QZ_SEMICOLON    0x29
    00089 #define QZ_QUOTE        0x27
    00090 #define QZ_RETURN       0x24
    00091 #define QZ_KP4          0x56
    00092 #define QZ_KP5          0x57
    00093 #define QZ_KP6          0x58
    00094 #define QZ_KP_PLUS      0x45
    00095 #define QZ_LSHIFT       0x38
    00096 #define QZ_z            0x06
    00097 #define QZ_x            0x07
    00098 #define QZ_c            0x08
    00099 #define QZ_v            0x09
    00100 #define QZ_b            0x0B
    00101 #define QZ_n            0x2D
    00102 #define QZ_m            0x2E
    00103 #define QZ_COMMA        0x2B
    00104 #define QZ_PERIOD       0x2F
    00105 #define QZ_SLASH        0x2C
    00106 #if 1        /* Panther now defines right side keys */
    00107 #define QZ_RSHIFT       0x3C
    00108 #endif
    00109 #define QZ_UP           0x7E
    00110 #define QZ_KP1          0x53
    00111 #define QZ_KP2          0x54
    00112 #define QZ_KP3          0x55
    00113 #define QZ_KP_ENTER     0x4C
    00114 #define QZ_LCTRL        0x3B
    00115 #define QZ_LALT         0x3A
    00116 #define QZ_LMETA        0x37
    00117 #define QZ_SPACE        0x31
    00118 #if 1        /* Panther now defines right side keys */
    00119 #define QZ_RMETA        0x36
    00120 #define QZ_RALT         0x3D
    00121 #define QZ_RCTRL        0x3E
    00122 #endif
    00123 #define QZ_LEFT         0x7B
    00124 #define QZ_DOWN         0x7D
    00125 #define QZ_RIGHT        0x7C
    00126 #define QZ_KP0          0x52
    00127 #define QZ_KP_PERIOD    0x41
    00128
    00129 /* Wierd, these keys are on my iBook under MacOS X */
    00130 #define QZ_IBOOK_ENTER  0x34
    00131 #define QZ_IBOOK_LEFT   0x3B
    00132 #define QZ_IBOOK_RIGHT  0x3C
    00133 #define QZ_IBOOK_DOWN   0x3D
    00134 #define QZ_IBOOK_UP     0x3E
    00135
    00136 #endif