1 /*****************************************************************************
2 * vlc_keys.h: keycode defines
3 *****************************************************************************
4 * Copyright (C) 2003-2009 VLC authors and VideoLAN
7 * Authors: Sigmund Augdal Helberg <dnumgis@videolan.org>
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU Lesser General Public License as published by
11 * the Free Software Foundation; either version 2.1 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public License
20 * along with this program; if not, write to the Free Software Foundation,
21 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22 *****************************************************************************/
29 * This file defines keys and functions
32 #define KEY_MODIFIER 0xFF000000
33 #define KEY_MODIFIER_ALT 0x01000000
34 #define KEY_MODIFIER_SHIFT 0x02000000
35 #define KEY_MODIFIER_CTRL 0x04000000
36 #define KEY_MODIFIER_META 0x08000000
37 #define KEY_MODIFIER_COMMAND 0x10000000
39 #define KEY_UNSET 0x00000000
40 #define KEY_BACKSPACE 0x08
42 #define KEY_ENTER 0x0D
44 /* End of Unicode range: 0x0010FFFF */
45 #define KEY_LEFT 0x00210000
46 #define KEY_RIGHT 0x00220000
47 #define KEY_UP 0x00230000
48 #define KEY_DOWN 0x00240000
49 #define KEY_F1 0x00270000
50 #define KEY_F2 0x00280000
51 #define KEY_F3 0x00290000
52 #define KEY_F4 0x002A0000
53 #define KEY_F5 0x002B0000
54 #define KEY_F6 0x002C0000
55 #define KEY_F7 0x002D0000
56 #define KEY_F8 0x002E0000
57 #define KEY_F9 0x002F0000
58 #define KEY_F10 0x00300000
59 #define KEY_F11 0x00310000
60 #define KEY_F12 0x00320000
61 #define KEY_HOME 0x00330000
62 #define KEY_END 0x00340000
63 #define KEY_INSERT 0x00350000
64 #define KEY_DELETE 0x00360000
65 #define KEY_MENU 0x00370000
66 #define KEY_PAGEUP 0x00390000
67 #define KEY_PAGEDOWN 0x003A0000
68 #define KEY_PRINT 0x003B0000
69 #define KEY_PAUSE 0x003D0000
71 #define KEY_BROWSER_BACK 0x003F0000
72 #define KEY_BROWSER_FORWARD 0x00400000
73 #define KEY_BROWSER_REFRESH 0x00410000
74 #define KEY_BROWSER_STOP 0x00420000
75 #define KEY_BROWSER_SEARCH 0x00430000
76 #define KEY_BROWSER_FAVORITES 0x00440000
77 #define KEY_BROWSER_HOME 0x00450000
78 #define KEY_VOLUME_MUTE 0x00460000
79 #define KEY_VOLUME_DOWN 0x00470000
80 #define KEY_VOLUME_UP 0x00480000
81 #define KEY_MEDIA_NEXT_TRACK 0x00490000
82 #define KEY_MEDIA_PREV_TRACK 0x004A0000
83 #define KEY_MEDIA_STOP 0x004B0000
84 #define KEY_MEDIA_PLAY_PAUSE 0x004C0000
85 #define KEY_MEDIA_RECORD 0x004D0000
86 #define KEY_MEDIA_REWIND 0x004E0000
87 #define KEY_MEDIA_FORWARD 0x004F0000
88 #define KEY_MEDIA_REPEAT 0x00500000
89 #define KEY_MEDIA_SHUFFLE 0x00510000
90 #define KEY_MEDIA_SUBTITLE 0x00520000
91 #define KEY_MEDIA_AUDIO 0x00530000
92 #define KEY_MEDIA_ANGLE 0x00540000
93 #define KEY_MEDIA_TIME 0x00550000
94 #define KEY_MEDIA_FRAME_PREV 0x00560000
95 #define KEY_MEDIA_FRAME_NEXT 0x00570000
96 #define KEY_MEDIA_SELECT 0x00580000
97 #define KEY_MEDIA_VIEW 0x00590000
98 #define KEY_MEDIA_MENU 0x005A0000
99 #define KEY_ZOOM_IN 0x00600000
100 #define KEY_ZOOM_OUT 0x00610000
101 #define KEY_BRIGHTNESS_UP 0x00620000
102 #define KEY_BRIGHTNESS_DOWN 0x00630000
104 #define KEY_MOUSEWHEELUP 0x00F00000
105 #define KEY_MOUSEWHEELDOWN 0x00F10000
106 #define KEY_MOUSEWHEELLEFT 0x00F20000
107 #define KEY_MOUSEWHEELRIGHT 0x00F30000
109 VLC_API
char *vlc_keycode2str(uint_fast32_t i_key
, bool locale
) VLC_USED
;
110 VLC_API
uint_fast32_t vlc_str2keycode(const char *str
) VLC_USED
;
112 typedef enum vlc_action
{
123 ACTIONID_TOGGLE_FULLSCREEN
,
126 ACTIONID_NAV_ACTIVATE
,
131 ACTIONID_JUMP_BACKWARD_EXTRASHORT
,
132 ACTIONID_JUMP_FORWARD_EXTRASHORT
,
133 ACTIONID_JUMP_BACKWARD_SHORT
,
134 ACTIONID_JUMP_FORWARD_SHORT
,
135 ACTIONID_JUMP_BACKWARD_MEDIUM
,
136 ACTIONID_JUMP_FORWARD_MEDIUM
,
137 ACTIONID_JUMP_BACKWARD_LONG
,
138 ACTIONID_JUMP_FORWARD_LONG
,
142 /* let ACTIONID_SET_BOOMARK* and ACTIONID_PLAY_BOOKMARK* be contiguous */
143 ACTIONID_SET_BOOKMARK1
,
144 ACTIONID_SET_BOOKMARK2
,
145 ACTIONID_SET_BOOKMARK3
,
146 ACTIONID_SET_BOOKMARK4
,
147 ACTIONID_SET_BOOKMARK5
,
148 ACTIONID_SET_BOOKMARK6
,
149 ACTIONID_SET_BOOKMARK7
,
150 ACTIONID_SET_BOOKMARK8
,
151 ACTIONID_SET_BOOKMARK9
,
152 ACTIONID_SET_BOOKMARK10
,
153 ACTIONID_PLAY_BOOKMARK1
,
154 ACTIONID_PLAY_BOOKMARK2
,
155 ACTIONID_PLAY_BOOKMARK3
,
156 ACTIONID_PLAY_BOOKMARK4
,
157 ACTIONID_PLAY_BOOKMARK5
,
158 ACTIONID_PLAY_BOOKMARK6
,
159 ACTIONID_PLAY_BOOKMARK7
,
160 ACTIONID_PLAY_BOOKMARK8
,
161 ACTIONID_PLAY_BOOKMARK9
,
162 ACTIONID_PLAY_BOOKMARK10
,
163 /* end of contiguous zone */
165 ACTIONID_SUBDELAY_UP
,
166 ACTIONID_SUBDELAY_DOWN
,
167 ACTIONID_SUBSYNC_MARKAUDIO
,
168 ACTIONID_SUBSYNC_MARKSUB
,
169 ACTIONID_SUBSYNC_APPLY
,
170 ACTIONID_SUBSYNC_RESET
,
172 ACTIONID_SUBPOS_DOWN
,
173 ACTIONID_AUDIO_TRACK
,
174 ACTIONID_SUBTITLE_TRACK
,
175 ACTIONID_SUBTITLE_TOGGLE
,
176 ACTIONID_SUBTITLE_TEXT_SCALE_NORMAL
,
177 ACTIONID_SUBTITLE_TEXT_SCALE_UP
,
178 ACTIONID_SUBTITLE_TEXT_SCALE_DOWN
,
179 ACTIONID_INTF_TOGGLE_FSC
,
182 /* chapter and title navigation */
185 ACTIONID_CHAPTER_PREV
,
186 ACTIONID_CHAPTER_NEXT
,
187 /* end of chapter and title navigation */
188 ACTIONID_AUDIODELAY_UP
,
189 ACTIONID_AUDIODELAY_DOWN
,
193 ACTIONID_ASPECT_RATIO
,
195 ACTIONID_DEINTERLACE
,
196 ACTIONID_DEINTERLACE_MODE
,
202 ACTIONID_UNCROP_LEFT
,
203 ACTIONID_CROP_BOTTOM
,
204 ACTIONID_UNCROP_BOTTOM
,
206 ACTIONID_UNCROP_RIGHT
,
210 ACTIONID_LEAVE_FULLSCREEN
,
212 ACTIONID_ZOOM_QUARTER
,
214 ACTIONID_ZOOM_ORIGINAL
,
215 ACTIONID_ZOOM_DOUBLE
,
216 /* Cycle Through Audio Devices */
217 ACTIONID_AUDIODEVICE_CYCLE
,
219 ACTIONID_TOGGLE_AUTOSCALE
,
223 ACTIONID_RATE_NORMAL
,
224 ACTIONID_RATE_SLOWER_FINE
,
225 ACTIONID_RATE_FASTER_FINE
,
226 /* Cycle Through Program Service IDs */
227 ACTIONID_PROGRAM_SID_NEXT
,
228 ACTIONID_PROGRAM_SID_PREV
,
229 ACTIONID_INTF_POPUP_MENU
,
231 ACTIONID_VIEWPOINT_FOV_IN
,
232 ACTIONID_VIEWPOINT_FOV_OUT
,
233 ACTIONID_VIEWPOINT_ROLL_CLOCK
,
234 ACTIONID_VIEWPOINT_ROLL_ANTICLOCK
,
236 ACTIONID_COMBO_VOL_FOV_UP
,
237 ACTIONID_COMBO_VOL_FOV_DOWN
,
241 VLC_API vlc_action_t
vlc_GetActionId(const char *psz_key
) VLC_USED
;
245 const char *psz_action
;