Commit 0369c9f0 authored by Jean-Paul Saman's avatar Jean-Paul Saman

Added new hotkeys (key-intf-hide, key-jump-3sec, key-jump+3sec,...

Added new hotkeys (key-intf-hide, key-jump-3sec, key-jump+3sec, key-title-next, key-title-prev, key-chapter-next, key-chapter-prev) and expanded the hotkey structure. This is a forward port from branch vlc-0.8.1-jpsaman-thedj revision 11756.
parent 90a27edc
...@@ -117,6 +117,10 @@ struct vlc_t ...@@ -117,6 +117,10 @@ struct vlc_t
int i_action; int i_action;
int i_key; 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; } *p_hotkeys;
}; };
...@@ -200,46 +200,55 @@ static inline int StringToKey( char *psz_key ) ...@@ -200,46 +200,55 @@ static inline int StringToKey( char *psz_key )
#define ACTIONID_NAV_DOWN 15 #define ACTIONID_NAV_DOWN 15
#define ACTIONID_NAV_LEFT 16 #define ACTIONID_NAV_LEFT 16
#define ACTIONID_NAV_RIGHT 17 #define ACTIONID_NAV_RIGHT 17
#define ACTIONID_JUMP_BACKWARD_10SEC 18 #define ACTIONID_JUMP_BACKWARD_3SEC 18
#define ACTIONID_JUMP_FORWARD_10SEC 19 #define ACTIONID_JUMP_FORWARD_3SEC 19
#define ACTIONID_JUMP_BACKWARD_1MIN 20 #define ACTIONID_JUMP_BACKWARD_10SEC 20
#define ACTIONID_JUMP_FORWARD_1MIN 21 #define ACTIONID_JUMP_FORWARD_10SEC 21
#define ACTIONID_JUMP_BACKWARD_5MIN 22 #define ACTIONID_JUMP_BACKWARD_1MIN 21
#define ACTIONID_JUMP_FORWARD_5MIN 23 #define ACTIONID_JUMP_FORWARD_1MIN 23
#define ACTIONID_POSITION 24 #define ACTIONID_JUMP_BACKWARD_5MIN 24
#define ACTIONID_VOL_MUTE 25 #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 */ /* let ACTIONID_SET_BOOMARK* and ACTIONID_PLAY_BOOKMARK* be contiguous */
#define ACTIONID_SET_BOOKMARK1 26 #define ACTIONID_SET_BOOKMARK1 28
#define ACTIONID_SET_BOOKMARK2 27 #define ACTIONID_SET_BOOKMARK2 29
#define ACTIONID_SET_BOOKMARK3 28 #define ACTIONID_SET_BOOKMARK3 39
#define ACTIONID_SET_BOOKMARK4 29 #define ACTIONID_SET_BOOKMARK4 31
#define ACTIONID_SET_BOOKMARK5 30 #define ACTIONID_SET_BOOKMARK5 32
#define ACTIONID_SET_BOOKMARK6 31 #define ACTIONID_SET_BOOKMARK6 33
#define ACTIONID_SET_BOOKMARK7 32 #define ACTIONID_SET_BOOKMARK7 34
#define ACTIONID_SET_BOOKMARK8 33 #define ACTIONID_SET_BOOKMARK8 35
#define ACTIONID_SET_BOOKMARK9 34 #define ACTIONID_SET_BOOKMARK9 36
#define ACTIONID_SET_BOOKMARK10 35 #define ACTIONID_SET_BOOKMARK10 37
#define ACTIONID_PLAY_BOOKMARK1 36 #define ACTIONID_PLAY_BOOKMARK1 38
#define ACTIONID_PLAY_BOOKMARK2 37 #define ACTIONID_PLAY_BOOKMARK2 39
#define ACTIONID_PLAY_BOOKMARK3 38 #define ACTIONID_PLAY_BOOKMARK3 40
#define ACTIONID_PLAY_BOOKMARK4 39 #define ACTIONID_PLAY_BOOKMARK4 41
#define ACTIONID_PLAY_BOOKMARK5 40 #define ACTIONID_PLAY_BOOKMARK5 42
#define ACTIONID_PLAY_BOOKMARK6 41 #define ACTIONID_PLAY_BOOKMARK6 43
#define ACTIONID_PLAY_BOOKMARK7 42 #define ACTIONID_PLAY_BOOKMARK7 44
#define ACTIONID_PLAY_BOOKMARK8 43 #define ACTIONID_PLAY_BOOKMARK8 45
#define ACTIONID_PLAY_BOOKMARK9 44 #define ACTIONID_PLAY_BOOKMARK9 46
#define ACTIONID_PLAY_BOOKMARK10 45 #define ACTIONID_PLAY_BOOKMARK10 47
/* end of contiguous zone */ /* end of contiguous zone */
#define ACTIONID_SUBDELAY_UP 46 #define ACTIONID_SUBDELAY_UP 48
#define ACTIONID_SUBDELAY_DOWN 47 #define ACTIONID_SUBDELAY_DOWN 49
#define ACTIONID_HISTORY_BACK 48 #define ACTIONID_HISTORY_BACK 50
#define ACTIONID_HISTORY_FORWARD 49 #define ACTIONID_HISTORY_FORWARD 51
#define ACTIONID_AUDIO_TRACK 50 #define ACTIONID_AUDIO_TRACK 52
#define ACTIONID_SUBTITLE_TRACK 51 #define ACTIONID_SUBTITLE_TRACK 53
#define ACTIONID_CUBESPEED_UP 52 #define ACTIONID_CUBESPEED_UP 54
#define ACTIONID_CUBESPEED_DOWN 53 #define ACTIONID_CUBESPEED_DOWN 55
#define ACTIONID_INTF_SHOW 52 #define ACTIONID_INTF_SHOW 56
#define ACTIONID_AUDIODELAY_UP 53 #define ACTIONID_INTF_HIDE 57
#define ACTIONID_AUDIODELAY_DOWN 54 /* chapter and title navigation */
#define ACTIONID_SNAPSHOT 55 #define ACTIONID_TITLE_PREV 58
#define ACTIONID_RECORD 56 #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
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
* $Id$ * $Id$
* *
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no> * 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 * 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 * 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 ) ...@@ -152,6 +153,7 @@ static void Close( vlc_object_t *p_this )
{ {
intf_thread_t *p_intf = (intf_thread_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 ) if( p_intf->p_sys->p_input )
{ {
vlc_object_release( 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 ) ...@@ -169,10 +171,10 @@ static void Close( vlc_object_t *p_this )
*****************************************************************************/ *****************************************************************************/
static void Run( intf_thread_t *p_intf ) static void Run( intf_thread_t *p_intf )
{ {
playlist_t *p_playlist; playlist_t *p_playlist = NULL;
input_thread_t *p_input; input_thread_t *p_input = NULL;
vout_thread_t *p_vout = 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; struct hotkey *p_hotkeys = p_intf->p_vlc->p_hotkeys;
vlc_value_t val; vlc_value_t val;
int i; int i;
...@@ -192,6 +194,7 @@ static void Run( intf_thread_t *p_intf ) ...@@ -192,6 +194,7 @@ static void Run( intf_thread_t *p_intf )
while( !p_intf->b_die ) while( !p_intf->b_die )
{ {
int i_key, i_action; int i_key, i_action;
int i_times = 0;
/* Sleep a bit */ /* Sleep a bit */
msleep( INTF_IDLE_SLEEP ); msleep( INTF_IDLE_SLEEP );
...@@ -241,6 +244,7 @@ static void Run( intf_thread_t *p_intf ) ...@@ -241,6 +244,7 @@ static void Run( intf_thread_t *p_intf )
if( p_hotkeys[i].i_key == i_key ) if( p_hotkeys[i].i_key == i_key )
{ {
i_action = p_hotkeys[i].i_action; 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 ) ...@@ -307,6 +311,17 @@ static void Run( intf_thread_t *p_intf )
vlc_object_release( p_playlist ); 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 ) else if( i_action == ACTIONID_SNAPSHOT )
{ {
if( p_vout ) vout_Control( p_vout, VOUT_SNAPSHOT ); if( p_vout ) vout_Control( p_vout, VOUT_SNAPSHOT );
...@@ -379,13 +394,25 @@ static void Run( intf_thread_t *p_intf ) ...@@ -379,13 +394,25 @@ static void Run( intf_thread_t *p_intf )
p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE ); FIND_ANYWHERE );
if( p_playlist ) if( 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 ); ClearChannels( p_intf, p_vout );
vout_OSDIcon( VLC_OBJECT( p_intf ), DEFAULT_CHAN, vout_OSDIcon( VLC_OBJECT( p_intf ), DEFAULT_CHAN,
OSD_PAUSE_ICON ); OSD_PAUSE_ICON );
playlist_Play( p_playlist ); playlist_Play( p_playlist );
}
vlc_object_release( p_playlist ); vlc_object_release( p_playlist );
} }
} }
else if( i_action == ACTIONID_PLAY_PAUSE ) else if( i_action == ACTIONID_PLAY_PAUSE )
{ {
...@@ -432,39 +459,51 @@ static void Run( intf_thread_t *p_intf ) ...@@ -432,39 +459,51 @@ static void Run( intf_thread_t *p_intf )
val.i_int = PAUSE_S; val.i_int = PAUSE_S;
var_Set( p_input, "state", val ); 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 ) 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 ); var_Set( p_input, "time-offset", val );
DisplayPosition( p_intf, p_vout, p_input ); DisplayPosition( p_intf, p_vout, p_input );
} }
else if( i_action == ACTIONID_JUMP_FORWARD_10SEC && b_seekable ) 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 ); var_Set( p_input, "time-offset", val );
DisplayPosition( p_intf, p_vout, p_input ); DisplayPosition( p_intf, p_vout, p_input );
} }
else if( i_action == ACTIONID_JUMP_BACKWARD_1MIN && b_seekable ) 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 ); var_Set( p_input, "time-offset", val );
DisplayPosition( p_intf, p_vout, p_input ); DisplayPosition( p_intf, p_vout, p_input );
} }
else if( i_action == ACTIONID_JUMP_FORWARD_1MIN && b_seekable ) 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 ); var_Set( p_input, "time-offset", val );
DisplayPosition( p_intf, p_vout, p_input ); DisplayPosition( p_intf, p_vout, p_input );
} }
else if( i_action == ACTIONID_JUMP_BACKWARD_5MIN && b_seekable ) 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 ); var_Set( p_input, "time-offset", val );
DisplayPosition( p_intf, p_vout, p_input ); DisplayPosition( p_intf, p_vout, p_input );
} }
else if( i_action == ACTIONID_JUMP_FORWARD_5MIN && b_seekable ) 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 ); var_Set( p_input, "time-offset", val );
DisplayPosition( p_intf, p_vout, p_input ); DisplayPosition( p_intf, p_vout, p_input );
} }
...@@ -588,13 +627,15 @@ static void Run( intf_thread_t *p_intf ) ...@@ -588,13 +627,15 @@ static void Run( intf_thread_t *p_intf )
} }
else if( i_action == ACTIONID_FASTER ) 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 ); var_Set( p_input, "rate-faster", val );
vout_OSDMessage( VLC_OBJECT(p_input), DEFAULT_CHAN, _("Faster") ); vout_OSDMessage( VLC_OBJECT(p_input), DEFAULT_CHAN, _("Faster") );
} }
else if( i_action == ACTIONID_SLOWER ) 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 ); var_Set( p_input, "rate-slower", val );
vout_OSDMessage( VLC_OBJECT(p_input), DEFAULT_CHAN, _("Slower") ); vout_OSDMessage( VLC_OBJECT(p_input), DEFAULT_CHAN, _("Slower") );
} }
...@@ -612,6 +653,27 @@ static void Run( intf_thread_t *p_intf ) ...@@ -612,6 +653,27 @@ static void Run( intf_thread_t *p_intf )
{ {
SetBookmark( p_intf, i_action - ACTIONID_SET_BOOKMARK1 + 1 ); 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, ...@@ -667,6 +729,7 @@ static int ActionKeyCB( vlc_object_t *p_this, char const *psz_var,
{ {
vlc_t *p_vlc = (vlc_t *)p_this; vlc_t *p_vlc = (vlc_t *)p_this;
struct hotkey *p_hotkeys = p_vlc->p_hotkeys; struct hotkey *p_hotkeys = p_vlc->p_hotkeys;
mtime_t i_date;
int i; int i;
for( i = 0; p_hotkeys[i].psz_action != NULL; 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, ...@@ -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 ) ) if( !strcmp( p_hotkeys[i].psz_action, psz_var ) )
{ {
p_hotkeys[i].i_key = newval.i_int; 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;
} }
} }
......
/***************************************************************************** /*****************************************************************************
* libvlc.h: main libvlc header * libvlc.h: main libvlc header
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2005 the VideoLAN team * Copyright (C) 1998-2005 VideoLAN (Centrale Réseaux) and its contributors
* $Id$ * $Id$
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
* Gildas Bazin <gbazin@videolan.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 * 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 * it under the terms of the GNU General Public License as published by
...@@ -297,6 +298,7 @@ static char *ppsz_align_descriptions[] = ...@@ -297,6 +298,7 @@ static char *ppsz_align_descriptions[] =
#define CLOCK_SYNCHRO_LONGTEXT N_( \ #define CLOCK_SYNCHRO_LONGTEXT N_( \
"Allows you to enable/disable the input clock synchronisation for " \ "Allows you to enable/disable the input clock synchronisation for " \
"real-time sources.") "real-time sources.")
static int pi_clock_values[] = { -1, 0, 1 }; static int pi_clock_values[] = { -1, 0, 1 };
static char *ppsz_clock_descriptions[] = static char *ppsz_clock_descriptions[] =
{ N_("Default"), N_("Disable"), N_("Enable") }; { N_("Default"), N_("Disable"), N_("Enable") };
...@@ -483,9 +485,6 @@ static char *ppsz_clock_descriptions[] = ...@@ -483,9 +485,6 @@ static char *ppsz_clock_descriptions[] =
#define SOCKS_PASS_LONGTEXT N_("Allows you to modify the password that will " \ #define SOCKS_PASS_LONGTEXT N_("Allows you to modify the password that will " \
"be used for the connection to the SOCKS server.") "be used for the connection to the SOCKS server.")
#define META_TITLE_TEXT N_("Title metadata") #define META_TITLE_TEXT N_("Title metadata")
#define META_TITLE_LONGTEXT N_( \ #define META_TITLE_LONGTEXT N_( \
"Allows you to specify a \"title\" metadata for an input.") "Allows you to specify a \"title\" metadata for an input.")
...@@ -780,6 +779,8 @@ static char *ppsz_clock_descriptions[] = ...@@ -780,6 +779,8 @@ static char *ppsz_clock_descriptions[] =
#define POSITION_KEY_TEXT N_("Position") #define POSITION_KEY_TEXT N_("Position")
#define POSITION_KEY_LONGTEXT N_("Select the hotkey to display the 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_TEXT N_("Jump 10 seconds backwards")
#define JB10SEC_KEY_LONGTEXT N_("Select the hotkey to 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[] = ...@@ -787,12 +788,14 @@ static char *ppsz_clock_descriptions[] =
#define JB1MIN_KEY_LONGTEXT N_("Select the hotkey to jump 1 minute backwards.") #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_TEXT N_("Jump 5 minutes backwards")
#define JB5MIN_KEY_LONGTEXT N_("Select the hotkey to 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_TEXT N_("Jump 10 seconds forward")
#define JF10SEC_KEY_LONGTEXT N_("Select the hotkey to 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_TEXT N_("Jump 1 minute forward")
#define JF1MIN_KEY_LONGTEXT N_("Select the hotkey to 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_TEXT N_("Jump 5 minutes forward")
#define JF5MIN_KEY_LONGTEXT N_("Select the hotkey to 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[] = ...@@ -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_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_TEXT N_("Activate")
#define NAV_ACTIVATE_KEY_LONGTEXT N_("Select the key to activate selected item in DVD menus.") #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_TEXT N_("Volume up")
#define VOL_UP_KEY_LONGTEXT N_("Select the key to increase audio volume.") #define VOL_UP_KEY_LONGTEXT N_("Select the key to increase audio volume.")
#define VOL_DOWN_KEY_TEXT N_("Volume down") #define VOL_DOWN_KEY_TEXT N_("Volume down")
...@@ -856,6 +867,8 @@ static char *ppsz_clock_descriptions[] = ...@@ -856,6 +867,8 @@ static char *ppsz_clock_descriptions[] =
#define SUBTITLE_TRACK_KEY_LONGTEXT N_("Cycle through the available subtitle tracks") #define SUBTITLE_TRACK_KEY_LONGTEXT N_("Cycle through the available subtitle tracks")
#define INTF_SHOW_KEY_TEXT N_("Show interface") #define INTF_SHOW_KEY_TEXT N_("Show interface")
#define INTF_SHOW_KEY_LONGTEXT N_("Raise the interface above all other windows") #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_TEXT N_("Take video snapshot")
#define SNAP_KEY_LONGTEXT N_("Takes a video snapshot and writes it to disk.") #define SNAP_KEY_LONGTEXT N_("Takes a video snapshot and writes it to disk.")
...@@ -1344,6 +1357,8 @@ vlc_module_begin(); ...@@ -1344,6 +1357,8 @@ vlc_module_begin();
# define KEY_PREV KEY_MODIFIER_COMMAND|KEY_LEFT # define KEY_PREV KEY_MODIFIER_COMMAND|KEY_LEFT
# define KEY_STOP KEY_MODIFIER_COMMAND|'.' # define KEY_STOP KEY_MODIFIER_COMMAND|'.'
# define KEY_POSITION 't' # 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_M10SEC KEY_MODIFIER_COMMAND|KEY_MODIFIER_ALT|KEY_LEFT
# define KEY_JUMP_P10SEC KEY_MODIFIER_COMMAND|KEY_MODIFIER_ALT|KEY_RIGHT # define KEY_JUMP_P10SEC KEY_MODIFIER_COMMAND|KEY_MODIFIER_ALT|KEY_RIGHT
# define KEY_JUMP_M1MIN KEY_MODIFIER_COMMAND|KEY_MODIFIER_SHIFT|KEY_LEFT # define KEY_JUMP_M1MIN KEY_MODIFIER_COMMAND|KEY_MODIFIER_SHIFT|KEY_LEFT
...@@ -1366,6 +1381,11 @@ vlc_module_begin(); ...@@ -1366,6 +1381,11 @@ vlc_module_begin();
# define KEY_AUDIO_TRACK 'l' # define KEY_AUDIO_TRACK 'l'
# define KEY_SUBTITLE_TRACK 's' # define KEY_SUBTITLE_TRACK 's'
# define KEY_INTF_SHOW 'i' # 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_SNAPSHOT KEY_MODIFIER_COMMAND|KEY_MODIFIER_ALT|'s'
# define KEY_SET_BOOKMARK1 KEY_MODIFIER_COMMAND|KEY_F1 # define KEY_SET_BOOKMARK1 KEY_MODIFIER_COMMAND|KEY_F1
...@@ -1403,6 +1423,8 @@ vlc_module_begin(); ...@@ -1403,6 +1423,8 @@ vlc_module_begin();
# define KEY_PREV 'p' # define KEY_PREV 'p'
# define KEY_STOP 's' # define KEY_STOP 's'
# define KEY_POSITION 't' # 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_M10SEC KEY_MODIFIER_ALT|KEY_LEFT
# define KEY_JUMP_P10SEC KEY_MODIFIER_ALT|KEY_RIGHT # define KEY_JUMP_P10SEC KEY_MODIFIER_ALT|KEY_RIGHT
# define KEY_JUMP_M1MIN KEY_MODIFIER_CTRL|KEY_LEFT # define KEY_JUMP_M1MIN KEY_MODIFIER_CTRL|KEY_LEFT
...@@ -1426,6 +1448,11 @@ vlc_module_begin(); ...@@ -1426,6 +1448,11 @@ vlc_module_begin();
# define KEY_AUDIO_TRACK 'l' # define KEY_AUDIO_TRACK 'l'
# define KEY_SUBTITLE_TRACK 'k' # define KEY_SUBTITLE_TRACK 'k'
# define KEY_INTF_SHOW 'i' # 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_SNAPSHOT KEY_MODIFIER_CTRL|KEY_MODIFIER_ALT|'s'
# define KEY_SET_BOOKMARK1 KEY_MODIFIER_CTRL|KEY_F1 # define KEY_SET_BOOKMARK1 KEY_MODIFIER_CTRL|KEY_F1
...@@ -1473,6 +1500,10 @@ vlc_module_begin(); ...@@ -1473,6 +1500,10 @@ vlc_module_begin();
STOP_KEY_LONGTEXT, VLC_FALSE ); STOP_KEY_LONGTEXT, VLC_FALSE );
add_key( "key-position", KEY_POSITION, NULL, POSITION_KEY_TEXT, add_key( "key-position", KEY_POSITION, NULL, POSITION_KEY_TEXT,
POSITION_KEY_LONGTEXT, VLC_TRUE ); 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, add_key( "key-jump-10sec", KEY_JUMP_M10SEC, NULL, JB10SEC_KEY_TEXT,
JB10SEC_KEY_LONGTEXT, VLC_FALSE ); JB10SEC_KEY_LONGTEXT, VLC_FALSE );
add_key( "key-jump+10sec", KEY_JUMP_P10SEC, NULL, JF10SEC_KEY_TEXT, add_key( "key-jump+10sec", KEY_JUMP_P10SEC, NULL, JF10SEC_KEY_TEXT,
...@@ -1497,6 +1528,15 @@ vlc_module_begin(); ...@@ -1497,6 +1528,15 @@ vlc_module_begin();
add_key( "key-nav-right", KEY_NAV_RIGHT, NULL, NAV_RIGHT_KEY_TEXT, add_key( "key-nav-right", KEY_NAV_RIGHT, NULL, NAV_RIGHT_KEY_TEXT,
NAV_RIGHT_KEY_LONGTEXT, VLC_TRUE ); 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, add_key( "key-quit", KEY_QUIT, NULL, QUIT_KEY_TEXT,
QUIT_KEY_LONGTEXT, VLC_FALSE ); QUIT_KEY_LONGTEXT, VLC_FALSE );
add_key( "key-vol-up", KEY_VOL_UP, NULL, VOL_UP_KEY_TEXT, add_key( "key-vol-up", KEY_VOL_UP, NULL, VOL_UP_KEY_TEXT,
...@@ -1519,6 +1559,8 @@ vlc_module_begin(); ...@@ -1519,6 +1559,8 @@ vlc_module_begin();
SUBTITLE_TRACK_KEY_TEXT, SUBTITLE_TRACK_KEY_LONGTEXT, VLC_FALSE ); SUBTITLE_TRACK_KEY_TEXT, SUBTITLE_TRACK_KEY_LONGTEXT, VLC_FALSE );
add_key( "key-intf-show", KEY_INTF_SHOW, NULL, add_key( "key-intf-show", KEY_INTF_SHOW, NULL,
INTF_SHOW_KEY_TEXT, INTF_SHOW_KEY_LONGTEXT, VLC_TRUE ); 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, add_key( "key-snapshot", KEY_SNAPSHOT, NULL,
SNAP_KEY_TEXT, SNAP_KEY_LONGTEXT, VLC_TRUE ); SNAP_KEY_TEXT, SNAP_KEY_LONGTEXT, VLC_TRUE );
...@@ -1612,62 +1654,68 @@ static module_config_t p_help_config[] = ...@@ -1612,62 +1654,68 @@ static module_config_t p_help_config[] =
*****************************************************************************/ *****************************************************************************/
static struct hotkey p_hotkeys[] = static struct hotkey p_hotkeys[] =
{ {
{ "key-quit", ACTIONID_QUIT, 0 }, { "key-quit", ACTIONID_QUIT, 0, 0, 0, 0 },
{ "key-play-pause", ACTIONID_PLAY_PAUSE, 0 }, { "key-play-pause", ACTIONID_PLAY_PAUSE, 0, 0, 0, 0 },
{ "key-play", ACTIONID_PLAY, 0 }, { "key-play", ACTIONID_PLAY, 0, 0, 0, 0 },
{ "key-pause", ACTIONID_PAUSE, 0 }, { "key-pause", ACTIONID_PAUSE, 0, 0, 0, 0 },
{ "key-stop", ACTIONID_STOP, 0 }, { "key-stop", ACTIONID_STOP, 0, 0