]> git.sesse.net Git - vlc/blobdiff - include/vlc_keys.h
Merge branch 1.0-bugfix
[vlc] / include / vlc_keys.h
index f178831cbc18fe1f688d4af52163aa7573d8a0ce..f78fd3a60dc1002da48d20b4b888716634e2dbcb 100644 (file)
@@ -108,6 +108,8 @@ static const struct key_descriptor_s vlc_modifiers[] =
     { "Meta", KEY_MODIFIER_META },
     { "Command", KEY_MODIFIER_COMMAND }
 };
+enum { vlc_num_modifiers=sizeof(vlc_modifiers)
+                        /sizeof(struct key_descriptor_s) };
 
 static const struct key_descriptor_s vlc_keys[] =
 {
@@ -178,21 +180,34 @@ static const struct key_descriptor_s vlc_keys[] =
     { "x", 'x' },
     { "y", 'y' },
     { "z", 'z' },
+    { "!", '!' },
+    { "\"", '\"' },
+    { "#", '#' },
+    { "$", '$' },
+    { "%", '%' },
+    { "&", '&' },
+    { "'", '\'' },
+    { "(", ')' },
+    { ")", ')' },
+    { "*", '*' },
     { "+", '+' },
-    { "=", '=' },
-    { "-", '-' },
     { ",", ',' },
+    { "-", '-' },
     { ".", '.' },
-    { "<", '<' },
-    { ">", '>' },
-    { "`", '`' },
     { "/", '/' },
+    { ":", ':' },
     { ";", ';' },
-    { "'", '\'' },
-    { "\\", '\\' },
+    { "<", '<' },
+    { "=", '=' },
+    { ">", '>' },
+    { "?", '?' },
+    { "@", '@' },
     { "[", '[' },
+    { "\\", '\\' },
     { "]", ']' },
-    { "*", '*' },
+    { "^", '^' },
+    { "_", '_' },
+    { "`", '`' },
     { "Browser Back", KEY_BROWSER_BACK },
     { "Browser Forward", KEY_BROWSER_FORWARD },
     { "Browser Refresh", KEY_BROWSER_REFRESH },
@@ -208,11 +223,12 @@ static const struct key_descriptor_s vlc_keys[] =
     { "Media Stop", KEY_MEDIA_STOP },
     { "Media Play Pause", KEY_MEDIA_PLAY_PAUSE }
 };
+enum { vlc_num_keys=sizeof(vlc_keys)/sizeof(struct key_descriptor_s) };
 
 static inline const char *KeyToString( int i_key )
 {
-    unsigned int i = 0;
-    for ( i = 0; i < sizeof(vlc_keys) / sizeof(key_descriptor_t); i++ )
+    size_t i;
+    for ( i = 0; i < vlc_num_keys; ++i )
     {
         if ( vlc_keys[i].i_key_code == i_key )
         {
@@ -224,8 +240,8 @@ static inline const char *KeyToString( int i_key )
 
 static inline int StringToKey( char *psz_key )
 {
-    unsigned int i = 0;
-    for ( i = 0; i < sizeof(vlc_keys) / sizeof(key_descriptor_t); i++ )
+    size_t i;
+    for ( i = 0; i < vlc_num_keys; ++i )
     {
         if ( !strcmp( vlc_keys[i].psz_key_string, psz_key ))
         {
@@ -309,7 +325,6 @@ typedef enum vlc_key {
     ACTIONID_DISC_MENU,
     ACTIONID_ASPECT_RATIO,
     ACTIONID_CROP,
-    ACTIONID_TOGGLE_SCALING,
     ACTIONID_DEINTERLACE,
     ACTIONID_ZOOM,
     ACTIONID_UNZOOM,
@@ -339,6 +354,15 @@ typedef enum vlc_key {
     ACTIONID_ZOOM_ORIGINAL,
     ACTIONID_ZOOM_DOUBLE,
     /* Cycle Through Audio Devices */
-    ACTIONID_AUDIODEVICE_CYCLE
+    ACTIONID_AUDIODEVICE_CYCLE,
+    /* scaling */
+    ACTIONID_TOGGLE_AUTOSCALE,
+    ACTIONID_SCALE_UP,
+    ACTIONID_SCALE_DOWN,
+    /* */
+    ACTIONID_RATE_NORMAL,
+    ACTIONID_RATE_SLOWER_FINE,
+    ACTIONID_RATE_FASTER_FINE,
+
 } vlc_key_t;
 #endif