X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=include%2Fvlc_keys.h;h=e7fc34c10a0d6be2c4cccf230ce5fe16eb0af02a;hb=fbf4c8060d35617e39b50ae739307152d02ed951;hp=ddd571cc5855b019f08c4e5fc427e94c121c18f8;hpb=62d1b7d2d6ce7b7eec5cc48f91e884e0de02a48d;p=vlc diff --git a/include/vlc_keys.h b/include/vlc_keys.h index ddd571cc58..e7fc34c10a 100644 --- a/include/vlc_keys.h +++ b/include/vlc_keys.h @@ -1,10 +1,10 @@ /***************************************************************************** - * hotkeys.h: keycode defines + * vlc_keys.h: keycode defines ***************************************************************************** - * Copyright (C) 2003 VideoLAN + * Copyright (C) 2003 the VideoLAN team * $Id$ * - * Authors: Sigmund Augdal + * Authors: Sigmund Augdal Helberg * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,9 +18,13 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ +#if !defined( __LIBVLC__ ) + #error You are not libvlc or one of its plugins. You cannot include this file +#endif + #define KEY_MODIFIER 0xFF000000 #define KEY_MODIFIER_ALT 0x01000000 #define KEY_MODIFIER_SHIFT 0x02000000 @@ -49,21 +53,41 @@ #define KEY_F12 0x00120000 #define KEY_HOME 0x00130000 #define KEY_END 0x00140000 -#define KEY_MENU 0x00150000 -#define KEY_ESC 0x00160000 -#define KEY_PAGEUP 0x00170000 -#define KEY_PAGEDOWN 0x00180000 -#define KEY_TAB 0x00190000 -#define KEY_BACKSPACE 0x001A0000 -#define KEY_MOUSEWHEELUP 0x001B0000 -#define KEY_MOUSEWHEELDOWN 0x001C0000 +#define KEY_INSERT 0x00150000 +#define KEY_DELETE 0x00160000 +#define KEY_MENU 0x00170000 +#define KEY_ESC 0x00180000 +#define KEY_PAGEUP 0x00190000 +#define KEY_PAGEDOWN 0x001A0000 +#define KEY_TAB 0x001B0000 +#define KEY_BACKSPACE 0x001C0000 +#define KEY_MOUSEWHEELUP 0x001D0000 +#define KEY_MOUSEWHEELDOWN 0x001E0000 + +/* TODO: + * The media keys are only used in win32. Support for other OSes needs to + * be added */ +#define KEY_BROWSER_BACK 0x001F0000 +#define KEY_BROWSER_FORWARD 0x00200000 +#define KEY_BROWSER_REFRESH 0x00210000 +#define KEY_BROWSER_STOP 0x00220000 +#define KEY_BROWSER_SEARCH 0x00230000 +#define KEY_BROWSER_FAVORITES 0x00240000 +#define KEY_BROWSER_HOME 0x00250000 +#define KEY_VOLUME_MUTE 0x00260000 +#define KEY_VOLUME_DOWN 0x00270000 +#define KEY_VOLUME_UP 0x00280000 +#define KEY_MEDIA_NEXT_TRACK 0x00290000 +#define KEY_MEDIA_PREV_TRACK 0x002a0000 +#define KEY_MEDIA_STOP 0x002b0000 +#define KEY_MEDIA_PLAY_PAUSE 0x002c0000 #define KEY_ASCII 0x0000007F #define KEY_UNSET 0 typedef struct key_descriptor_s { - char *psz_key_string; + const char *psz_key_string; int i_key_code; } key_descriptor_t; @@ -101,6 +125,8 @@ static const struct key_descriptor_s vlc_keys[] = { "F12", KEY_F12 }, { "Home", KEY_HOME }, { "End", KEY_END }, + { "Insert", KEY_INSERT }, + { "Delete", KEY_DELETE }, { "Menu", KEY_MENU }, { "Esc", KEY_ESC }, { "Page Up", KEY_PAGEUP }, @@ -149,10 +175,24 @@ static const struct key_descriptor_s vlc_keys[] = { "\\", '\\' }, { "[", '[' }, { "]", ']' }, - { "*", '*' } + { "*", '*' }, + { "Browser Back", KEY_BROWSER_BACK }, + { "Browser Forward", KEY_BROWSER_FORWARD }, + { "Browser Refresh", KEY_BROWSER_REFRESH }, + { "Browser Stop", KEY_BROWSER_STOP }, + { "Browser Search", KEY_BROWSER_SEARCH }, + { "Browser Favorites", KEY_BROWSER_FAVORITES }, + { "Browser Home", KEY_BROWSER_HOME }, + { "Volume Mute", KEY_VOLUME_MUTE }, + { "Volume Down", KEY_VOLUME_DOWN }, + { "Volume Up", KEY_VOLUME_UP }, + { "Media Next Track", KEY_MEDIA_NEXT_TRACK }, + { "Media Prev Track", KEY_MEDIA_PREV_TRACK }, + { "Media Stop", KEY_MEDIA_STOP }, + { "Media Play Pause", KEY_MEDIA_PLAY_PAUSE } }; -static inline char *KeyToString( int i_key ) +static inline const char *KeyToString( int i_key ) { unsigned int i = 0; for ( i = 0; i < sizeof(vlc_keys) / sizeof(key_descriptor_t); i++ ) @@ -196,41 +236,70 @@ static inline int StringToKey( char *psz_key ) #define ACTIONID_NAV_DOWN 15 #define ACTIONID_NAV_LEFT 16 #define ACTIONID_NAV_RIGHT 17 -#define ACTIONID_JUMP_BACKWARD_10SEC 18 -#define ACTIONID_JUMP_FORWARD_10SEC 19 -#define ACTIONID_JUMP_BACKWARD_1MIN 20 -#define ACTIONID_JUMP_FORWARD_1MIN 21 -#define ACTIONID_JUMP_BACKWARD_5MIN 22 -#define ACTIONID_JUMP_FORWARD_5MIN 23 -#define ACTIONID_POSITION 24 -#define ACTIONID_VOL_MUTE 25 +#define ACTIONID_JUMP_BACKWARD_EXTRASHORT 18 +#define ACTIONID_JUMP_FORWARD_EXTRASHORT 19 +#define ACTIONID_JUMP_BACKWARD_SHORT 20 +#define ACTIONID_JUMP_FORWARD_SHORT 21 +#define ACTIONID_JUMP_BACKWARD_MEDIUM 22 +#define ACTIONID_JUMP_FORWARD_MEDIUM 23 +#define ACTIONID_JUMP_BACKWARD_LONG 24 +#define ACTIONID_JUMP_FORWARD_LONG 25 +#define ACTIONID_POSITION 26 +#define ACTIONID_VOL_MUTE 27 /* let ACTIONID_SET_BOOMARK* and ACTIONID_PLAY_BOOKMARK* be contiguous */ -#define ACTIONID_SET_BOOKMARK1 26 -#define ACTIONID_SET_BOOKMARK2 27 -#define ACTIONID_SET_BOOKMARK3 28 -#define ACTIONID_SET_BOOKMARK4 29 -#define ACTIONID_SET_BOOKMARK5 30 -#define ACTIONID_SET_BOOKMARK6 31 -#define ACTIONID_SET_BOOKMARK7 32 -#define ACTIONID_SET_BOOKMARK8 33 -#define ACTIONID_SET_BOOKMARK9 34 -#define ACTIONID_SET_BOOKMARK10 35 -#define ACTIONID_PLAY_BOOKMARK1 36 -#define ACTIONID_PLAY_BOOKMARK2 37 -#define ACTIONID_PLAY_BOOKMARK3 38 -#define ACTIONID_PLAY_BOOKMARK4 39 -#define ACTIONID_PLAY_BOOKMARK5 40 -#define ACTIONID_PLAY_BOOKMARK6 41 -#define ACTIONID_PLAY_BOOKMARK7 42 -#define ACTIONID_PLAY_BOOKMARK8 43 -#define ACTIONID_PLAY_BOOKMARK9 44 -#define ACTIONID_PLAY_BOOKMARK10 45 +#define ACTIONID_SET_BOOKMARK1 28 +#define ACTIONID_SET_BOOKMARK2 29 +#define ACTIONID_SET_BOOKMARK3 39 +#define ACTIONID_SET_BOOKMARK4 31 +#define ACTIONID_SET_BOOKMARK5 32 +#define ACTIONID_SET_BOOKMARK6 33 +#define ACTIONID_SET_BOOKMARK7 34 +#define ACTIONID_SET_BOOKMARK8 35 +#define ACTIONID_SET_BOOKMARK9 36 +#define ACTIONID_SET_BOOKMARK10 37 +#define ACTIONID_PLAY_BOOKMARK1 38 +#define ACTIONID_PLAY_BOOKMARK2 39 +#define ACTIONID_PLAY_BOOKMARK3 40 +#define ACTIONID_PLAY_BOOKMARK4 41 +#define ACTIONID_PLAY_BOOKMARK5 42 +#define ACTIONID_PLAY_BOOKMARK6 43 +#define ACTIONID_PLAY_BOOKMARK7 44 +#define ACTIONID_PLAY_BOOKMARK8 45 +#define ACTIONID_PLAY_BOOKMARK9 46 +#define ACTIONID_PLAY_BOOKMARK10 47 /* end of contiguous zone */ -#define ACTIONID_SUBDELAY_UP 46 -#define ACTIONID_SUBDELAY_DOWN 47 -#define ACTIONID_HISTORY_BACK 48 -#define ACTIONID_HISTORY_FORWARD 49 -#define ACTIONID_AUDIO_TRACK 50 -#define ACTIONID_SUBTITLE_TRACK 51 -#define ACTIONID_INTF_SHOW 52 - +#define ACTIONID_SUBDELAY_UP 48 +#define ACTIONID_SUBDELAY_DOWN 49 +#define ACTIONID_HISTORY_BACK 50 +#define ACTIONID_HISTORY_FORWARD 51 +#define ACTIONID_AUDIO_TRACK 52 +#define ACTIONID_SUBTITLE_TRACK 53 +#define ACTIONID_CUBESPEED_UP 54 +#define ACTIONID_CUBESPEED_DOWN 55 +#define ACTIONID_INTF_SHOW 56 +#define ACTIONID_INTF_HIDE 57 +/* chapter and title navigation */ +#define ACTIONID_TITLE_PREV 58 +#define ACTIONID_TITLE_NEXT 59 +#define ACTIONID_CHAPTER_PREV 60 +#define ACTIONID_CHAPTER_NEXT 61 +/* end of chapter and title navigation */ +#define ACTIONID_AUDIODELAY_UP 62 +#define ACTIONID_AUDIODELAY_DOWN 63 +#define ACTIONID_SNAPSHOT 64 +#define ACTIONID_RECORD 65 +#define ACTIONID_DISC_MENU 66 +#define ACTIONID_ASPECT_RATIO 67 +#define ACTIONID_CROP 68 +#define ACTIONID_DEINTERLACE 69 +#define ACTIONID_ZOOM 70 +#define ACTIONID_UNZOOM 71 +#define ACTIONID_CROP_TOP 72 +#define ACTIONID_UNCROP_TOP 73 +#define ACTIONID_CROP_LEFT 74 +#define ACTIONID_UNCROP_LEFT 75 +#define ACTIONID_CROP_BOTTOM 76 +#define ACTIONID_UNCROP_BOTTOM 77 +#define ACTIONID_CROP_RIGHT 78 +#define ACTIONID_UNCROP_RIGHT 79 +#define ACTIONID_DUMP 80