x11: input: add print and menu keys
[mplayer.git] / input / keycodes.h
blob84b41a3e892bc335f007e16dd994414ab74355f6
1 /*
2 * KEY code definitions for keys/events not passed by ASCII value
4 * This file is part of MPlayer.
6 * MPlayer is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * MPlayer is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 #ifndef MPLAYER_KEYCODES_H
22 #define MPLAYER_KEYCODES_H
24 #define MP_KEY_BASE (1<<21)
26 // For appleir.c which includes another header with KEY_ENTER etc defines
27 #ifndef AR_DEFINES_ONLY
29 #define KEY_ENTER 13
30 #define KEY_TAB 9
32 /* Control keys */
33 #define KEY_CTRL (MP_KEY_BASE)
34 #define KEY_BACKSPACE (KEY_CTRL+0)
35 #define KEY_DELETE (KEY_CTRL+1)
36 #define KEY_INSERT (KEY_CTRL+2)
37 #define KEY_HOME (KEY_CTRL+3)
38 #define KEY_END (KEY_CTRL+4)
39 #define KEY_PAGE_UP (KEY_CTRL+5)
40 #define KEY_PAGE_DOWN (KEY_CTRL+6)
41 #define KEY_ESC (KEY_CTRL+7)
42 #define KEY_PRINT (KEY_CTRL+8)
44 /* Control keys short name */
45 #define KEY_BS KEY_BACKSPACE
46 #define KEY_DEL KEY_DELETE
47 #define KEY_INS KEY_INSERT
48 #define KEY_PGUP KEY_PAGE_UP
49 #define KEY_PGDOWN KEY_PAGE_DOWN
50 #define KEY_PGDWN KEY_PAGE_DOWN
52 /* Cursor movement */
53 #define KEY_CRSR (MP_KEY_BASE+0x10)
54 #define KEY_RIGHT (KEY_CRSR+0)
55 #define KEY_LEFT (KEY_CRSR+1)
56 #define KEY_DOWN (KEY_CRSR+2)
57 #define KEY_UP (KEY_CRSR+3)
59 /* Multimedia keyboard/remote keys */
60 #define KEY_MM_BASE (MP_KEY_BASE+0x20)
61 #define KEY_POWER (KEY_MM_BASE+0)
62 #define KEY_MENU (KEY_MM_BASE+1)
63 #define KEY_PLAY (KEY_MM_BASE+2)
64 #define KEY_PAUSE (KEY_MM_BASE+3)
65 #define KEY_PLAYPAUSE (KEY_MM_BASE+4)
66 #define KEY_STOP (KEY_MM_BASE+5)
67 #define KEY_FORWARD (KEY_MM_BASE+6)
68 #define KEY_REWIND (KEY_MM_BASE+7)
69 #define KEY_NEXT (KEY_MM_BASE+8)
70 #define KEY_PREV (KEY_MM_BASE+9)
71 #define KEY_VOLUME_UP (KEY_MM_BASE+10)
72 #define KEY_VOLUME_DOWN (KEY_MM_BASE+11)
73 #define KEY_MUTE (KEY_MM_BASE+12)
75 /* Function keys */
76 #define KEY_F (MP_KEY_BASE+0x40)
78 /* Keypad keys */
79 #define KEY_KEYPAD (MP_KEY_BASE+0x60)
80 #define KEY_KP0 (KEY_KEYPAD+0)
81 #define KEY_KP1 (KEY_KEYPAD+1)
82 #define KEY_KP2 (KEY_KEYPAD+2)
83 #define KEY_KP3 (KEY_KEYPAD+3)
84 #define KEY_KP4 (KEY_KEYPAD+4)
85 #define KEY_KP5 (KEY_KEYPAD+5)
86 #define KEY_KP6 (KEY_KEYPAD+6)
87 #define KEY_KP7 (KEY_KEYPAD+7)
88 #define KEY_KP8 (KEY_KEYPAD+8)
89 #define KEY_KP9 (KEY_KEYPAD+9)
90 #define KEY_KPDEC (KEY_KEYPAD+10)
91 #define KEY_KPINS (KEY_KEYPAD+11)
92 #define KEY_KPDEL (KEY_KEYPAD+12)
93 #define KEY_KPENTER (KEY_KEYPAD+13)
96 // Joystick input module
97 #define JOY_BASE (MP_KEY_BASE+0x70)
98 #define JOY_AXIS0_PLUS (JOY_BASE+0)
99 #define JOY_AXIS0_MINUS (JOY_BASE+1)
100 #define JOY_AXIS1_PLUS (JOY_BASE+2)
101 #define JOY_AXIS1_MINUS (JOY_BASE+3)
102 #define JOY_AXIS2_PLUS (JOY_BASE+4)
103 #define JOY_AXIS2_MINUS (JOY_BASE+5)
104 #define JOY_AXIS3_PLUS (JOY_BASE+6)
105 #define JOY_AXIS3_MINUS (JOY_BASE+7)
106 #define JOY_AXIS4_PLUS (JOY_BASE+8)
107 #define JOY_AXIS4_MINUS (JOY_BASE+9)
108 #define JOY_AXIS5_PLUS (JOY_BASE+10)
109 #define JOY_AXIS5_MINUS (JOY_BASE+11)
110 #define JOY_AXIS6_PLUS (JOY_BASE+12)
111 #define JOY_AXIS6_MINUS (JOY_BASE+13)
112 #define JOY_AXIS7_PLUS (JOY_BASE+14)
113 #define JOY_AXIS7_MINUS (JOY_BASE+15)
114 #define JOY_AXIS8_PLUS (JOY_BASE+16)
115 #define JOY_AXIS8_MINUS (JOY_BASE+17)
116 #define JOY_AXIS9_PLUS (JOY_BASE+18)
117 #define JOY_AXIS9_MINUS (JOY_BASE+19)
119 #define JOY_BTN_BASE ((MP_KEY_BASE+0x90)|MP_NO_REPEAT_KEY)
120 #define JOY_BTN0 (JOY_BTN_BASE+0)
121 #define JOY_BTN1 (JOY_BTN_BASE+1)
122 #define JOY_BTN2 (JOY_BTN_BASE+2)
123 #define JOY_BTN3 (JOY_BTN_BASE+3)
124 #define JOY_BTN4 (JOY_BTN_BASE+4)
125 #define JOY_BTN5 (JOY_BTN_BASE+5)
126 #define JOY_BTN6 (JOY_BTN_BASE+6)
127 #define JOY_BTN7 (JOY_BTN_BASE+7)
128 #define JOY_BTN8 (JOY_BTN_BASE+8)
129 #define JOY_BTN9 (JOY_BTN_BASE+9)
132 // Mouse events from VOs
133 #define MOUSE_BASE ((MP_KEY_BASE+0xA0)|MP_NO_REPEAT_KEY)
134 #define MOUSE_BTN0 (MOUSE_BASE+0)
135 #define MOUSE_BTN1 (MOUSE_BASE+1)
136 #define MOUSE_BTN2 (MOUSE_BASE+2)
137 #define MOUSE_BTN3 (MOUSE_BASE+3)
138 #define MOUSE_BTN4 (MOUSE_BASE+4)
139 #define MOUSE_BTN5 (MOUSE_BASE+5)
140 #define MOUSE_BTN6 (MOUSE_BASE+6)
141 #define MOUSE_BTN7 (MOUSE_BASE+7)
142 #define MOUSE_BTN8 (MOUSE_BASE+8)
143 #define MOUSE_BTN9 (MOUSE_BASE+9)
144 #define MOUSE_BTN10 (MOUSE_BASE+10)
145 #define MOUSE_BTN11 (MOUSE_BASE+11)
146 #define MOUSE_BTN12 (MOUSE_BASE+12)
147 #define MOUSE_BTN13 (MOUSE_BASE+13)
148 #define MOUSE_BTN14 (MOUSE_BASE+14)
149 #define MOUSE_BTN15 (MOUSE_BASE+15)
150 #define MOUSE_BTN16 (MOUSE_BASE+16)
151 #define MOUSE_BTN17 (MOUSE_BASE+17)
152 #define MOUSE_BTN18 (MOUSE_BASE+18)
153 #define MOUSE_BTN19 (MOUSE_BASE+19)
154 #define MOUSE_BTN_END (MOUSE_BASE+20)
156 #define MOUSE_BASE_DBL ((MP_KEY_BASE+0xC0)|MP_NO_REPEAT_KEY)
157 #define MOUSE_BTN0_DBL (MOUSE_BASE_DBL+0)
158 #define MOUSE_BTN1_DBL (MOUSE_BASE_DBL+1)
159 #define MOUSE_BTN2_DBL (MOUSE_BASE_DBL+2)
160 #define MOUSE_BTN3_DBL (MOUSE_BASE_DBL+3)
161 #define MOUSE_BTN4_DBL (MOUSE_BASE_DBL+4)
162 #define MOUSE_BTN5_DBL (MOUSE_BASE_DBL+5)
163 #define MOUSE_BTN6_DBL (MOUSE_BASE_DBL+6)
164 #define MOUSE_BTN7_DBL (MOUSE_BASE_DBL+7)
165 #define MOUSE_BTN8_DBL (MOUSE_BASE_DBL+8)
166 #define MOUSE_BTN9_DBL (MOUSE_BASE_DBL+9)
167 #define MOUSE_BTN10_DBL (MOUSE_BASE_DBL+10)
168 #define MOUSE_BTN11_DBL (MOUSE_BASE_DBL+11)
169 #define MOUSE_BTN12_DBL (MOUSE_BASE_DBL+12)
170 #define MOUSE_BTN13_DBL (MOUSE_BASE_DBL+13)
171 #define MOUSE_BTN14_DBL (MOUSE_BASE_DBL+14)
172 #define MOUSE_BTN15_DBL (MOUSE_BASE_DBL+15)
173 #define MOUSE_BTN16_DBL (MOUSE_BASE_DBL+16)
174 #define MOUSE_BTN17_DBL (MOUSE_BASE_DBL+17)
175 #define MOUSE_BTN18_DBL (MOUSE_BASE_DBL+18)
176 #define MOUSE_BTN19_DBL (MOUSE_BASE_DBL+19)
177 #define MOUSE_BTN_DBL_END (MOUSE_BASE_DBL+20)
180 #endif // AR_DEFINES_ONLY
182 // Apple Remote input module
183 #define AR_BASE (MP_KEY_BASE+0xE0)
184 #define AR_PLAY (AR_BASE + 0)
185 #define AR_PLAY_HOLD (AR_BASE + 1)
186 #define AR_NEXT (AR_BASE + 2)
187 #define AR_NEXT_HOLD (AR_BASE + 3)
188 #define AR_PREV (AR_BASE + 4)
189 #define AR_PREV_HOLD (AR_BASE + 5)
190 #define AR_MENU (AR_BASE + 6)
191 #define AR_MENU_HOLD (AR_BASE + 7)
192 #define AR_VUP (AR_BASE + 8)
193 #define AR_VDOWN (AR_BASE + 9)
195 #ifndef AR_DEFINES_ONLY
198 /* Special keys */
199 #define KEY_INTERN (MP_KEY_BASE+0x1000)
200 #define KEY_CLOSE_WIN (KEY_INTERN+0)
202 /* Modifiers added to individual keys */
203 #define KEY_MODIFIER_SHIFT (1<<22)
204 #define KEY_MODIFIER_CTRL (1<<23)
205 #define KEY_MODIFIER_ALT (1<<24)
206 #define KEY_MODIFIER_META (1<<25)
208 #endif // AR_DEFINES_ONLY
210 // Use this when the key shouldn't be auto-repeated (like mouse buttons)
211 #define MP_NO_REPEAT_KEY (1<<28)
213 #define MP_KEY_DOWN (1<<29)
215 #endif /* MPLAYER_KEYCODES_H */