* hotkeys.h: keycode defines
*****************************************************************************
* Copyright (C) 2003 VideoLAN
- * $Id: vlc_keys.h,v 1.5 2003/10/29 01:33:27 gbazin Exp $
+ * $Id: vlc_keys.h,v 1.13 2004/01/25 18:17:08 zorglub Exp $
*
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
*
#define ADD_KEY(a) { a, *a }
-static const struct key_descriptor_s modifiers[] =
+static const struct key_descriptor_s vlc_modifiers[] =
{
{ "Alt", KEY_MODIFIER_ALT },
{ "Shift", KEY_MODIFIER_SHIFT },
{ "Command", KEY_MODIFIER_COMMAND }
};
-static const struct key_descriptor_s keys[] =
+static const struct key_descriptor_s vlc_keys[] =
{
{ "Unset", KEY_UNSET },
{ "Left", KEY_LEFT },
{ "[", '[' },
{ "]", ']' },
{ "*", '*' }
-
};
static inline char *KeyToString( int i_key )
{
unsigned int i = 0;
- for ( i = 0; i < sizeof(keys) / sizeof(key_descriptor_t); i++ )
+ for ( i = 0; i < sizeof(vlc_keys) / sizeof(key_descriptor_t); i++ )
{
- if ( keys[i].i_key_code == i_key )
+ if ( vlc_keys[i].i_key_code == i_key )
{
- return keys[i].psz_key_string;
+ return vlc_keys[i].psz_key_string;
}
}
return NULL;
}
+static inline int StringToKey( char *psz_key )
+{
+ unsigned int i = 0;
+ for ( i = 0; i < sizeof(vlc_keys) / sizeof(key_descriptor_t); i++ )
+ {
+ if ( !strcmp( vlc_keys[i].psz_key_string, psz_key ))
+ {
+ return vlc_keys[i].i_key_code;
+ }
+ }
+ return 0;
+}
+
+
#define ACTIONID_QUIT 1
#define ACTIONID_PLAY_PAUSE 2
#define ACTIONID_PLAY 3
#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
+/* 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
+/* end of contiguous zone */