]> git.sesse.net Git - vlc/commitdiff
Added new hotkeys (key-intf-hide, key-jump-3sec, key-jump+3sec, key-title-next, key...
authorJean-Paul Saman <jpsaman@videolan.org>
Tue, 9 Aug 2005 14:27:23 +0000 (14:27 +0000)
committerJean-Paul Saman <jpsaman@videolan.org>
Tue, 9 Aug 2005 14:27:23 +0000 (14:27 +0000)
include/main.h
include/vlc_keys.h
modules/control/hotkeys.c
src/libvlc.h

index 4a20ee98fd8b1095b6582453c9de42be9c2e76f1..9434168d2b3b77b92ddcbf1a6cc6a32759933f4f 100644 (file)
@@ -116,7 +116,11 @@ struct vlc_t
         const char *psz_action;
         int i_action;
         int i_key;
-
+        
+        /* hotkey accounting information */
+        mtime_t i_delta_date;/*< minimum delta time between two key presses */
+        mtime_t i_last_date; /*< last date key was pressed */
+        int     i_times;     /*< n times pressed within delta date*/
     } *p_hotkeys;
 };
 
index 82b1bb00edee426ecb6dae7bc4a8df559379dd6c..78d2367a2eb1513a505304e9d900cadfb8620624 100644 (file)
@@ -200,46 +200,55 @@ 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_3SEC    18
+#define ACTIONID_JUMP_FORWARD_3SEC     19
+#define ACTIONID_JUMP_BACKWARD_10SEC   20
+#define ACTIONID_JUMP_FORWARD_10SEC    21
+#define ACTIONID_JUMP_BACKWARD_1MIN    21
+#define ACTIONID_JUMP_FORWARD_1MIN     23
+#define ACTIONID_JUMP_BACKWARD_5MIN    24
+#define ACTIONID_JUMP_FORWARD_5MIN     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_CUBESPEED_UP          52
-#define ACTIONID_CUBESPEED_DOWN        53
-#define ACTIONID_INTF_SHOW             52
-#define ACTIONID_AUDIODELAY_UP         53
-#define ACTIONID_AUDIODELAY_DOWN       54
-#define ACTIONID_SNAPSHOT              55
-#define ACTIONID_RECORD                56
+#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
index 21d7b4f387c20930d999d1d6c4890ee530834f84..333f8f19b3b91a5e414cef80164e575dd6152b5f 100644 (file)
@@ -5,6 +5,7 @@
  * $Id$
  *
  * Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
+ *          Jean-Paul Saman <jpsaman #_at_# m2x.nl>
  *
  * 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
@@ -152,6 +153,7 @@ static void Close( vlc_object_t *p_this )
 {
     intf_thread_t *p_intf = (intf_thread_t *)p_this;
 
+    var_DelCallback( p_intf->p_vlc, "key-pressed", KeyEvent, p_intf );
     if( p_intf->p_sys->p_input )
     {
         vlc_object_release( p_intf->p_sys->p_input );
@@ -169,10 +171,10 @@ static void Close( vlc_object_t *p_this )
  *****************************************************************************/
 static void Run( intf_thread_t *p_intf )
 {
-    playlist_t *p_playlist;
-    input_thread_t *p_input;
+    playlist_t *p_playlist = NULL;
+    input_thread_t *p_input = NULL;
     vout_thread_t *p_vout = NULL;
-    vout_thread_t *p_last_vout;
+    vout_thread_t *p_last_vout = NULL;
     struct hotkey *p_hotkeys = p_intf->p_vlc->p_hotkeys;
     vlc_value_t val;
     int i;
@@ -192,6 +194,7 @@ static void Run( intf_thread_t *p_intf )
     while( !p_intf->b_die )
     {
         int i_key, i_action;
+        int i_times = 0;
 
         /* Sleep a bit */
         msleep( INTF_IDLE_SLEEP );
@@ -241,6 +244,7 @@ static void Run( intf_thread_t *p_intf )
             if( p_hotkeys[i].i_key == i_key )
             {
                  i_action = p_hotkeys[i].i_action;
+                 i_times  = p_hotkeys[i].i_times; /* times key pressed within max. delta time */
             }
         }
 
@@ -307,6 +311,17 @@ static void Run( intf_thread_t *p_intf )
                 vlc_object_release( p_playlist );
             }
         }
+        else if( i_action == ACTIONID_INTF_HIDE )
+        {
+            val.b_bool = VLC_FALSE;
+            p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
+                                          FIND_ANYWHERE );
+            if( p_playlist )
+            {
+                var_Set( p_playlist, "intf-show", val );
+                vlc_object_release( p_playlist );
+            }
+        }
         else if( i_action == ACTIONID_SNAPSHOT )
         {
             if( p_vout ) vout_Control( p_vout, VOUT_SNAPSHOT );
@@ -380,12 +395,24 @@ static void Run( intf_thread_t *p_intf )
                                           FIND_ANYWHERE );
             if( p_playlist )
             {
-                ClearChannels( p_intf, p_vout );
-                vout_OSDIcon( VLC_OBJECT( p_intf ), DEFAULT_CHAN,
-                              OSD_PAUSE_ICON );
-                playlist_Play( p_playlist );
+                var_Get( p_input, "rate", &val );
+                msg_Dbg( p_input, "rate %d", val.i_int );
+                if( val.i_int != INPUT_RATE_DEFAULT )
+                {
+                    /* Return to normal speed */
+                    val.i_int = INPUT_RATE_DEFAULT;
+                    var_Set( p_input, "rate", val );
+                }
+                else
+                {
+                    ClearChannels( p_intf, p_vout );
+                    vout_OSDIcon( VLC_OBJECT( p_intf ), DEFAULT_CHAN,
+                                  OSD_PAUSE_ICON );
+                    playlist_Play( p_playlist );
+                }
                 vlc_object_release( p_playlist );
             }
+
         }
         else if( i_action == ACTIONID_PLAY_PAUSE )
         {
@@ -432,39 +459,51 @@ static void Run( intf_thread_t *p_intf )
                 val.i_int = PAUSE_S;
                 var_Set( p_input, "state", val );
             }
+            else if( i_action == ACTIONID_JUMP_BACKWARD_3SEC && b_seekable )
+            {
+                val.i_time = (-3000000 * 2^i_times);
+                var_Set( p_input, "time-offset", val );
+                DisplayPosition( p_intf, p_vout, p_input );
+            }
+            else if( i_action == ACTIONID_JUMP_FORWARD_3SEC && b_seekable )
+            {
+                val.i_time = (3000000 * 2^i_times);
+                var_Set( p_input, "time-offset", val );
+                DisplayPosition( p_intf, p_vout, p_input );
+            }
             else if( i_action == ACTIONID_JUMP_BACKWARD_10SEC && b_seekable )
             {
-                val.i_time = -10000000;
+                val.i_time = (-10000000 * 2^i_times);
                 var_Set( p_input, "time-offset", val );
                 DisplayPosition( p_intf, p_vout, p_input );
             }
             else if( i_action == ACTIONID_JUMP_FORWARD_10SEC && b_seekable )
             {
-                val.i_time = 10000000;
+                val.i_time = (10000000 * 2^i_times);
                 var_Set( p_input, "time-offset", val );
                 DisplayPosition( p_intf, p_vout, p_input );
             }
             else if( i_action == ACTIONID_JUMP_BACKWARD_1MIN && b_seekable )
             {
-                val.i_time = -60000000;
+                val.i_time = (-60000000 * 2^i_times);
                 var_Set( p_input, "time-offset", val );
                 DisplayPosition( p_intf, p_vout, p_input );
             }
             else if( i_action == ACTIONID_JUMP_FORWARD_1MIN && b_seekable )
             {
-                val.i_time = 60000000;
+                val.i_time = (60000000 * 2^i_times);
                 var_Set( p_input, "time-offset", val );
                 DisplayPosition( p_intf, p_vout, p_input );
             }
             else if( i_action == ACTIONID_JUMP_BACKWARD_5MIN && b_seekable )
             {
-                val.i_time = -300000000;
+                val.i_time = (-300000000 * 2^i_times);
                 var_Set( p_input, "time-offset", val );
                 DisplayPosition( p_intf, p_vout, p_input );
             }
             else if( i_action == ACTIONID_JUMP_FORWARD_5MIN && b_seekable )
             {
-                val.i_time = 300000000;
+                val.i_time = (300000000 * 2^i_times);
                 var_Set( p_input, "time-offset", val );
                 DisplayPosition( p_intf, p_vout, p_input );
             }
@@ -588,13 +627,15 @@ static void Run( intf_thread_t *p_intf )
             }
             else if( i_action == ACTIONID_FASTER )
             {
-                vlc_value_t val; val.b_bool = VLC_TRUE;
+                vlc_value_t val;
+                val.b_bool = VLC_TRUE;
                 var_Set( p_input, "rate-faster", val );
                 vout_OSDMessage( VLC_OBJECT(p_input), DEFAULT_CHAN, _("Faster") );
             }
             else if( i_action == ACTIONID_SLOWER )
             {
-                vlc_value_t val; val.b_bool = VLC_TRUE;
+                vlc_value_t val;
+                val.b_bool = VLC_TRUE;
                 var_Set( p_input, "rate-slower", val );
                 vout_OSDMessage( VLC_OBJECT(p_input), DEFAULT_CHAN, _("Slower") );
             }
@@ -612,6 +653,27 @@ static void Run( intf_thread_t *p_intf )
             {
                 SetBookmark( p_intf, i_action - ACTIONID_SET_BOOKMARK1 + 1 );
             }
+            /* Only makes sense with DVD */
+            else if( i_action == ACTIONID_TITLE_PREV )
+            {
+                val.b_bool = VLC_TRUE;
+                var_Set( p_input, "prev-title", val );
+            }
+            else if( i_action == ACTIONID_TITLE_NEXT )
+            {
+                val.b_bool = VLC_TRUE;
+                var_Set( p_input, "next-title", val );
+            }
+            else if( i_action == ACTIONID_CHAPTER_PREV )
+            {
+                val.b_bool = VLC_TRUE;
+                var_Set( p_input, "prev-chapter", val );
+            }
+            else if( i_action == ACTIONID_CHAPTER_NEXT )
+            {
+                val.b_bool = VLC_TRUE;
+                var_Set( p_input, "next-chapter", val );
+            }
         }
     }
 }
@@ -667,6 +729,7 @@ static int ActionKeyCB( vlc_object_t *p_this, char const *psz_var,
 {
     vlc_t *p_vlc = (vlc_t *)p_this;
     struct hotkey *p_hotkeys = p_vlc->p_hotkeys;
+    mtime_t i_date;
     int i;
 
     for( i = 0; p_hotkeys[i].psz_action != NULL; i++ )
@@ -674,6 +737,14 @@ static int ActionKeyCB( vlc_object_t *p_this, char const *psz_var,
         if( !strcmp( p_hotkeys[i].psz_action, psz_var ) )
         {
             p_hotkeys[i].i_key = newval.i_int;
+            /* do hotkey accounting */            
+            i_date = mdate();
+            if( (p_hotkeys[i].i_delta_date > 0) &&
+                (p_hotkeys[i].i_delta_date <= (i_date - p_hotkeys[i].i_last_date) ) )
+                p_hotkeys[i].i_times = 0;
+            else
+                p_hotkeys[i].i_times++;
+            p_hotkeys[i].i_last_date = i_date;
         }
     }
 
index 61680a134a8346df8913b4c3378675462c811922..f8e9a5908cb9bc7f50ec041ce88676aeb79b82d8 100644 (file)
@@ -1,12 +1,13 @@
 /*****************************************************************************
  * libvlc.h: main libvlc header
  *****************************************************************************
- * Copyright (C) 1998-2005 the VideoLAN team
+ * Copyright (C) 1998-2005 VideoLAN (Centrale Réseaux) and its contributors
  * $Id$
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
  *          Gildas Bazin <gbazin@videolan.org>
+ *          Jean-Paul Saman <jpsaman #_at_# m2x.nl>
  *
  * 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
@@ -297,6 +298,7 @@ static char *ppsz_align_descriptions[] =
 #define CLOCK_SYNCHRO_LONGTEXT N_( \
     "Allows you to enable/disable the input clock synchronisation for " \
     "real-time sources.")
+
 static int pi_clock_values[] = { -1, 0, 1 };
 static char *ppsz_clock_descriptions[] =
 { N_("Default"), N_("Disable"), N_("Enable") };
@@ -483,9 +485,6 @@ static char *ppsz_clock_descriptions[] =
 #define SOCKS_PASS_LONGTEXT N_("Allows you to modify the password that will " \
     "be used for the connection to the SOCKS server.")
 
-
-
-
 #define META_TITLE_TEXT N_("Title metadata")
 #define META_TITLE_LONGTEXT N_( \
      "Allows you to specify a \"title\" metadata for an input.")
@@ -780,6 +779,8 @@ static char *ppsz_clock_descriptions[] =
 #define POSITION_KEY_TEXT N_("Position")
 #define POSITION_KEY_LONGTEXT N_("Select the hotkey to display the position.")
 
+#define JB3SEC_KEY_TEXT N_("Jump 3 seconds backwards")
+#define JB3SEC_KEY_LONGTEXT N_("Select the hotkey to jump 3 seconds backwards.")
 #define JB10SEC_KEY_TEXT N_("Jump 10 seconds backwards")
 #define JB10SEC_KEY_LONGTEXT N_("Select the hotkey to jump 10 seconds backwards.")
 
@@ -787,12 +788,14 @@ static char *ppsz_clock_descriptions[] =
 #define JB1MIN_KEY_LONGTEXT N_("Select the hotkey to jump 1 minute backwards.")
 #define JB5MIN_KEY_TEXT N_("Jump 5 minutes backwards")
 #define JB5MIN_KEY_LONGTEXT N_("Select the hotkey to jump 5 minutes backwards.")
+
+#define JF3SEC_KEY_TEXT N_("Jump 3 seconds forward")
+#define JF3SEC_KEY_LONGTEXT N_("Select the hotkey to jump 3 seconds forward.")
 #define JF10SEC_KEY_TEXT N_("Jump 10 seconds forward")
 #define JF10SEC_KEY_LONGTEXT N_("Select the hotkey to jump 10 seconds forward.")
 
 #define JF1MIN_KEY_TEXT N_("Jump 1 minute forward")
 #define JF1MIN_KEY_LONGTEXT N_("Select the hotkey to jump 1 minute forward.")
-
 #define JF5MIN_KEY_TEXT N_("Jump 5 minutes forward")
 #define JF5MIN_KEY_LONGTEXT N_("Select the hotkey to jump 5 minutes forward.")
 
@@ -808,6 +811,14 @@ static char *ppsz_clock_descriptions[] =
 #define NAV_RIGHT_KEY_LONGTEXT N_("Select the key to move the selector right in DVD menus.")
 #define NAV_ACTIVATE_KEY_TEXT N_("Activate")
 #define NAV_ACTIVATE_KEY_LONGTEXT N_("Select the key to activate selected item in DVD menus.")
+#define TITLE_PREV_TEXT N_("Select previous DVD title")
+#define TITLE_PREV_LONGTEXT N_("Select the key to choose the previous title from the DVD")
+#define TITLE_NEXT_TEXT N_("Select next DVD title")
+#define TITLE_NEXT_LONGTEXT N_("Select the key to choose the next title from the DVD")
+#define CHAPTER_PREV_TEXT N_("Select prev DVD chapter")
+#define CHAPTER_PREV_LONGTEXT N_("Select the key to choose the previous chapter from the DVD")
+#define CHAPTER_NEXT_TEXT N_("Select prev DVD chapter")
+#define CHAPTER_NEXT_LONGTEXT N_("Select the key to choose the next chapter from the DVD")
 #define VOL_UP_KEY_TEXT N_("Volume up")
 #define VOL_UP_KEY_LONGTEXT N_("Select the key to increase audio volume.")
 #define VOL_DOWN_KEY_TEXT N_("Volume down")
@@ -856,6 +867,8 @@ static char *ppsz_clock_descriptions[] =
 #define SUBTITLE_TRACK_KEY_LONGTEXT N_("Cycle through the available subtitle tracks")
 #define INTF_SHOW_KEY_TEXT N_("Show interface")
 #define INTF_SHOW_KEY_LONGTEXT N_("Raise the interface above all other windows")
+#define INTF_HIDE_KEY_TEXT N_("Hide interface")
+#define INTF_HIDE_KEY_LONGTEXT N_("Lower the interface below all other windows")
 #define SNAP_KEY_TEXT N_("Take video snapshot")
 #define SNAP_KEY_LONGTEXT N_("Takes a video snapshot and writes it to disk.")
 
@@ -1344,6 +1357,8 @@ vlc_module_begin();
 #   define KEY_PREV               KEY_MODIFIER_COMMAND|KEY_LEFT
 #   define KEY_STOP               KEY_MODIFIER_COMMAND|'.'
 #   define KEY_POSITION           't'
+#   define KEY_JUMP_M3SEC         KEY_MODIFIER_COMMAND|KEY_MODIFIER_CTRL|KEY_LEFT
+#   define KEY_JUMP_P3SEC         KEY_MODIFIER_COMMAND|KEY_MODIFIER_CTRL|KEY_RIGHT
 #   define KEY_JUMP_M10SEC        KEY_MODIFIER_COMMAND|KEY_MODIFIER_ALT|KEY_LEFT
 #   define KEY_JUMP_P10SEC        KEY_MODIFIER_COMMAND|KEY_MODIFIER_ALT|KEY_RIGHT
 #   define KEY_JUMP_M1MIN         KEY_MODIFIER_COMMAND|KEY_MODIFIER_SHIFT|KEY_LEFT
@@ -1366,6 +1381,11 @@ vlc_module_begin();
 #   define KEY_AUDIO_TRACK        'l'
 #   define KEY_SUBTITLE_TRACK     's'
 #   define KEY_INTF_SHOW          'i'
+#   define KEY_INTF_HIDE          'I'
+#   define KEY_TITLE_PREV         KEY_MODIFIER_CTRL|'p'
+#   define KEY_TITLE_NEXT         KEY_MODIFIER_CTRL|'n'
+#   define KEY_CHAPTER_PREV       KEY_MODIFIER_CTRL|'u'
+#   define KEY_CHAPTER_NEXT       KEY_MODIFIER_CTRL|'d'
 #   define KEY_SNAPSHOT           KEY_MODIFIER_COMMAND|KEY_MODIFIER_ALT|'s'
 
 #   define KEY_SET_BOOKMARK1      KEY_MODIFIER_COMMAND|KEY_F1
@@ -1403,6 +1423,8 @@ vlc_module_begin();
 #   define KEY_PREV               'p'
 #   define KEY_STOP               's'
 #   define KEY_POSITION           't'
+#   define KEY_JUMP_M3SEC         KEY_MODIFIER_SHIFT|KEY_LEFT
+#   define KEY_JUMP_P3SEC         KEY_MODIFIER_SHIFT|KEY_RIGHT
 #   define KEY_JUMP_M10SEC        KEY_MODIFIER_ALT|KEY_LEFT
 #   define KEY_JUMP_P10SEC        KEY_MODIFIER_ALT|KEY_RIGHT
 #   define KEY_JUMP_M1MIN         KEY_MODIFIER_CTRL|KEY_LEFT
@@ -1426,6 +1448,11 @@ vlc_module_begin();
 #   define KEY_AUDIO_TRACK        'l'
 #   define KEY_SUBTITLE_TRACK     'k'
 #   define KEY_INTF_SHOW          'i'
+#   define KEY_INTF_HIDE          'I'
+#   define KEY_TITLE_PREV         KEY_MODIFIER_CTRL|'p'
+#   define KEY_TITLE_NEXT         KEY_MODIFIER_CTRL|'n'
+#   define KEY_CHAPTER_PREV       KEY_MODIFIER_CTRL|'u'
+#   define KEY_CHAPTER_NEXT       KEY_MODIFIER_CTRL|'d'
 #   define KEY_SNAPSHOT           KEY_MODIFIER_CTRL|KEY_MODIFIER_ALT|'s'
 
 #   define KEY_SET_BOOKMARK1      KEY_MODIFIER_CTRL|KEY_F1
@@ -1473,6 +1500,10 @@ vlc_module_begin();
              STOP_KEY_LONGTEXT, VLC_FALSE );
     add_key( "key-position", KEY_POSITION, NULL, POSITION_KEY_TEXT,
              POSITION_KEY_LONGTEXT, VLC_TRUE );
+    add_key( "key-jump-3sec", KEY_JUMP_M3SEC, NULL, JB3SEC_KEY_TEXT,
+             JB3SEC_KEY_LONGTEXT, VLC_FALSE );
+    add_key( "key-jump+3sec", KEY_JUMP_P3SEC, NULL, JF3SEC_KEY_TEXT,
+             JF3SEC_KEY_LONGTEXT, VLC_FALSE );             
     add_key( "key-jump-10sec", KEY_JUMP_M10SEC, NULL, JB10SEC_KEY_TEXT,
              JB10SEC_KEY_LONGTEXT, VLC_FALSE );
     add_key( "key-jump+10sec", KEY_JUMP_P10SEC, NULL, JF10SEC_KEY_TEXT,
@@ -1497,6 +1528,15 @@ vlc_module_begin();
     add_key( "key-nav-right", KEY_NAV_RIGHT, NULL, NAV_RIGHT_KEY_TEXT,
              NAV_RIGHT_KEY_LONGTEXT, VLC_TRUE );
 
+    add_key( "key-title-prev", KEY_TITLE_PREV, NULL, TITLE_PREV_TEXT,
+             TITLE_PREV_LONGTEXT, VLC_TRUE );
+    add_key( "key-title-next", KEY_TITLE_NEXT, NULL, TITLE_NEXT_TEXT,
+             TITLE_NEXT_LONGTEXT, VLC_TRUE );
+    add_key( "key-chapter-prev", KEY_CHAPTER_PREV, NULL, CHAPTER_PREV_TEXT,
+             CHAPTER_PREV_LONGTEXT, VLC_TRUE );
+    add_key( "key-chapter-next", KEY_CHAPTER_NEXT, NULL, CHAPTER_NEXT_TEXT,
+             CHAPTER_NEXT_LONGTEXT, VLC_TRUE );
+                          
     add_key( "key-quit", KEY_QUIT, NULL, QUIT_KEY_TEXT,
              QUIT_KEY_LONGTEXT, VLC_FALSE );
     add_key( "key-vol-up", KEY_VOL_UP, NULL, VOL_UP_KEY_TEXT,
@@ -1519,6 +1559,8 @@ vlc_module_begin();
              SUBTITLE_TRACK_KEY_TEXT, SUBTITLE_TRACK_KEY_LONGTEXT, VLC_FALSE );
     add_key( "key-intf-show", KEY_INTF_SHOW, NULL,
              INTF_SHOW_KEY_TEXT, INTF_SHOW_KEY_LONGTEXT, VLC_TRUE );
+    add_key( "key-intf-hide", KEY_INTF_HIDE, NULL,
+             INTF_HIDE_KEY_TEXT, INTF_HIDE_KEY_LONGTEXT, VLC_TRUE );             
     add_key( "key-snapshot", KEY_SNAPSHOT, NULL,
              SNAP_KEY_TEXT, SNAP_KEY_LONGTEXT, VLC_TRUE );
 
@@ -1612,62 +1654,68 @@ static module_config_t p_help_config[] =
  *****************************************************************************/
 static struct hotkey p_hotkeys[] =
 {
-    { "key-quit", ACTIONID_QUIT, 0 },
-    { "key-play-pause", ACTIONID_PLAY_PAUSE, 0 },
-    { "key-play", ACTIONID_PLAY, 0 },
-    { "key-pause", ACTIONID_PAUSE, 0 },
-    { "key-stop", ACTIONID_STOP, 0 },
-    { "key-position", ACTIONID_POSITION, 0 },
-    { "key-jump-10sec", ACTIONID_JUMP_BACKWARD_10SEC, 0 },
-    { "key-jump+10sec", ACTIONID_JUMP_FORWARD_10SEC, 0 },
-    { "key-jump-1min", ACTIONID_JUMP_BACKWARD_1MIN, 0 },
-    { "key-jump+1min", ACTIONID_JUMP_FORWARD_1MIN, 0 },
-    { "key-jump-5min", ACTIONID_JUMP_BACKWARD_5MIN, 0 },
-    { "key-jump+5min", ACTIONID_JUMP_FORWARD_5MIN, 0 },
-    { "key-prev", ACTIONID_PREV, 0 },
-    { "key-next", ACTIONID_NEXT, 0 },
-    { "key-faster", ACTIONID_FASTER, 0 },
-    { "key-slower", ACTIONID_SLOWER, 0 },
-    { "key-fullscreen", ACTIONID_FULLSCREEN, 0 },
-    { "key-vol-up", ACTIONID_VOL_UP, 0 },
-    { "key-vol-down", ACTIONID_VOL_DOWN, 0 },
-    { "key-vol-mute", ACTIONID_VOL_MUTE, 0 },
-    { "key-subdelay-down", ACTIONID_SUBDELAY_DOWN, 0 },
-    { "key-subdelay-up", ACTIONID_SUBDELAY_UP, 0 },
-    { "key-audiodelay-down", ACTIONID_AUDIODELAY_DOWN, 0 },
-    { "key-audiodelay-up", ACTIONID_AUDIODELAY_UP, 0 },
-    { "key-audio-track", ACTIONID_AUDIO_TRACK, 0},
-    { "key-subtitle-track", ACTIONID_SUBTITLE_TRACK, 0},
-    { "key-intf-show", ACTIONID_INTF_SHOW, 0},
-    { "key-snapshot", ACTIONID_SNAPSHOT, 0},
-    { "key-nav-activate", ACTIONID_NAV_ACTIVATE, 0 },
-    { "key-nav-up", ACTIONID_NAV_UP, 0 },
-    { "key-nav-down", ACTIONID_NAV_DOWN, 0 },
-    { "key-nav-left", ACTIONID_NAV_LEFT, 0 },
-    { "key-nav-right", ACTIONID_NAV_RIGHT, 0 },
-    { "key-set-bookmark1", ACTIONID_SET_BOOKMARK1, 0},
-    { "key-set-bookmark2", ACTIONID_SET_BOOKMARK2, 0},
-    { "key-set-bookmark3", ACTIONID_SET_BOOKMARK3, 0},
-    { "key-set-bookmark4", ACTIONID_SET_BOOKMARK4, 0},
-    { "key-set-bookmark5", ACTIONID_SET_BOOKMARK5, 0},
-    { "key-set-bookmark6", ACTIONID_SET_BOOKMARK6, 0},
-    { "key-set-bookmark7", ACTIONID_SET_BOOKMARK7, 0},
-    { "key-set-bookmark8", ACTIONID_SET_BOOKMARK8, 0},
-    { "key-set-bookmark9", ACTIONID_SET_BOOKMARK9, 0},
-    { "key-set-bookmark10", ACTIONID_SET_BOOKMARK10, 0},
-    { "key-play-bookmark1", ACTIONID_PLAY_BOOKMARK1, 0},
-    { "key-play-bookmark2", ACTIONID_PLAY_BOOKMARK2, 0},
-    { "key-play-bookmark3", ACTIONID_PLAY_BOOKMARK3, 0},
-    { "key-play-bookmark4", ACTIONID_PLAY_BOOKMARK4, 0},
-    { "key-play-bookmark5", ACTIONID_PLAY_BOOKMARK5, 0},
-    { "key-play-bookmark6", ACTIONID_PLAY_BOOKMARK6, 0},
-    { "key-play-bookmark7", ACTIONID_PLAY_BOOKMARK7, 0},
-    { "key-play-bookmark8", ACTIONID_PLAY_BOOKMARK8, 0},
-    { "key-play-bookmark9", ACTIONID_PLAY_BOOKMARK9, 0},
-    { "key-play-bookmark10", ACTIONID_PLAY_BOOKMARK10, 0},
-    { "key-history-back", ACTIONID_HISTORY_BACK, 0},
-    { "key-history-forward", ACTIONID_HISTORY_FORWARD, 0},
-    { "key-record", ACTIONID_RECORD, 0 },
-    { NULL, 0, 0 }
+    { "key-quit", ACTIONID_QUIT, 0, 0, 0, 0 },
+    { "key-play-pause", ACTIONID_PLAY_PAUSE, 0, 0, 0, 0 },
+    { "key-play", ACTIONID_PLAY, 0, 0, 0, 0 },
+    { "key-pause", ACTIONID_PAUSE, 0, 0, 0, 0 },
+    { "key-stop", ACTIONID_STOP, 0, 0, 0, 0 },
+    { "key-position", ACTIONID_POSITION, 0, 0, 0, 0 },
+    { "key-jump-3sec", ACTIONID_JUMP_BACKWARD_3SEC, 0, 1000000, 0, 0 },
+    { "key-jump+3sec", ACTIONID_JUMP_FORWARD_3SEC, 0, 1000000, 0, 0 },
+    { "key-jump-10sec", ACTIONID_JUMP_BACKWARD_10SEC, 0, 1000000, 0, 0 },
+    { "key-jump+10sec", ACTIONID_JUMP_FORWARD_10SEC, 0, 1000000, 0, 0 },
+    { "key-jump-1min", ACTIONID_JUMP_BACKWARD_1MIN, 0, 1000000, 0, 0 },
+    { "key-jump+1min", ACTIONID_JUMP_FORWARD_1MIN, 0, 1000000, 0, 0 },
+    { "key-jump-5min", ACTIONID_JUMP_BACKWARD_5MIN, 0, 1000000, 0, 0 },
+    { "key-jump+5min", ACTIONID_JUMP_FORWARD_5MIN, 0, 1000000, 0, 0 },
+    { "key-prev", ACTIONID_PREV, 0, 0, 0, 0 },
+    { "key-next", ACTIONID_NEXT, 0, 0, 0, 0 },
+    { "key-faster", ACTIONID_FASTER, 0, 0, 0, 0 },
+    { "key-slower", ACTIONID_SLOWER, 0, 0, 0, 0 },
+    { "key-fullscreen", ACTIONID_FULLSCREEN, 0, 0, 0, 0 },
+    { "key-vol-up", ACTIONID_VOL_UP, 0, 0, 0, 0 },
+    { "key-vol-down", ACTIONID_VOL_DOWN, 0, 0, 0, 0 },
+    { "key-vol-mute", ACTIONID_VOL_MUTE, 0, 0, 0, 0 },
+    { "key-subdelay-down", ACTIONID_SUBDELAY_DOWN, 0, 0, 0, 0 },
+    { "key-subdelay-up", ACTIONID_SUBDELAY_UP, 0, 0, 0, 0 },
+    { "key-audiodelay-down", ACTIONID_AUDIODELAY_DOWN, 0, 0, 0, 0 },
+    { "key-audiodelay-up", ACTIONID_AUDIODELAY_UP, 0, 0, 0, 0 },
+    { "key-audio-track", ACTIONID_AUDIO_TRACK, 0, 0, 0, 0 },
+    { "key-subtitle-track", ACTIONID_SUBTITLE_TRACK, 0, 0, 0, 0 },
+    { "key-intf-show", ACTIONID_INTF_SHOW, 0, 0, 0, 0 },
+    { "key-intf-hide", ACTIONID_INTF_HIDE, 0, 0, 0, 0 },
+    { "key-snapshot", ACTIONID_SNAPSHOT, 0, 0, 0, 0 },
+    { "key-nav-activate", ACTIONID_NAV_ACTIVATE, 0, 0, 0, 0 },
+    { "key-nav-up", ACTIONID_NAV_UP, 0, 0, 0, 0 },
+    { "key-nav-down", ACTIONID_NAV_DOWN, 0, 0, 0, 0 },
+    { "key-nav-left", ACTIONID_NAV_LEFT, 0, 0, 0, 0 },
+    { "key-nav-right", ACTIONID_NAV_RIGHT, 0, 0, 0, 0 },
+    { "key-title-prev", ACTIONID_TITLE_PREV, 0, 0, 0, 0 },
+    { "key-title-next", ACTIONID_TITLE_NEXT, 0, 0, 0, 0 },
+    { "key-chapter-prev", ACTIONID_CHAPTER_PREV, 0, 0, 0, 0 },
+    { "key-chapter-next", ACTIONID_CHAPTER_NEXT, 0, 0, 0, 0 },
+    { "key-set-bookmark1", ACTIONID_SET_BOOKMARK1, 0, 0, 0, 0 },
+    { "key-set-bookmark2", ACTIONID_SET_BOOKMARK2, 0, 0, 0, 0 },
+    { "key-set-bookmark3", ACTIONID_SET_BOOKMARK3, 0, 0, 0, 0 },
+    { "key-set-bookmark4", ACTIONID_SET_BOOKMARK4, 0, 0, 0, 0 },
+    { "key-set-bookmark5", ACTIONID_SET_BOOKMARK5, 0, 0, 0, 0 },
+    { "key-set-bookmark6", ACTIONID_SET_BOOKMARK6, 0, 0, 0, 0 },
+    { "key-set-bookmark7", ACTIONID_SET_BOOKMARK7, 0, 0, 0, 0 },
+    { "key-set-bookmark8", ACTIONID_SET_BOOKMARK8, 0, 0, 0, 0 },
+    { "key-set-bookmark9", ACTIONID_SET_BOOKMARK9, 0, 0, 0, 0 },
+    { "key-set-bookmark10", ACTIONID_SET_BOOKMARK10, 0, 0, 0, 0 },
+    { "key-play-bookmark1", ACTIONID_PLAY_BOOKMARK1, 0, 0, 0, 0 },
+    { "key-play-bookmark2", ACTIONID_PLAY_BOOKMARK2, 0, 0, 0, 0 },
+    { "key-play-bookmark3", ACTIONID_PLAY_BOOKMARK3, 0, 0, 0, 0 },
+    { "key-play-bookmark4", ACTIONID_PLAY_BOOKMARK4, 0, 0, 0, 0 },
+    { "key-play-bookmark5", ACTIONID_PLAY_BOOKMARK5, 0, 0, 0, 0 },
+    { "key-play-bookmark6", ACTIONID_PLAY_BOOKMARK6, 0, 0, 0, 0 },
+    { "key-play-bookmark7", ACTIONID_PLAY_BOOKMARK7, 0, 0, 0, 0 },
+    { "key-play-bookmark8", ACTIONID_PLAY_BOOKMARK8, 0, 0, 0, 0 },
+    { "key-play-bookmark9", ACTIONID_PLAY_BOOKMARK9, 0, 0, 0, 0 },
+    { "key-play-bookmark10", ACTIONID_PLAY_BOOKMARK10, 0, 0, 0, 0 },
+    { "key-history-back", ACTIONID_HISTORY_BACK, 0, 0, 0, 0 },
+    { "key-history-forward", ACTIONID_HISTORY_FORWARD, 0, 0, 0, 0 },
+    { "key-record", ACTIONID_RECORD, 0, 0, 0, 0 },
+    { NULL, 0, 0, 0, 0, 0 }
 };
-