Commit 46c6826d authored by Gildas Bazin's avatar Gildas Bazin

* modules/control/hotkeys.c, src/libvlc.h, include/vlc_keys.h: added hotkeys for jump actions.
parent fe21029c
......@@ -2,7 +2,7 @@
* 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.6 2003/10/30 17:58:07 gbazin Exp $
*
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
*
......@@ -179,3 +179,9 @@ static inline char *KeyToString( int i_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
......@@ -2,7 +2,7 @@
* hotkeys.c: Hotkey handling for vlc
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: hotkeys.c,v 1.3 2003/10/29 02:13:04 hartman Exp $
* $Id: hotkeys.c,v 1.4 2003/10/30 17:58:07 gbazin Exp $
*
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
*
......@@ -270,6 +270,36 @@ static void Run( intf_thread_t *p_intf )
Feedback( p_intf, _( "Pause" ) );
input_SetStatus( p_input, INPUT_STATUS_PAUSE );
}
else if( i_action == ACTIONID_JUMP_BACKWARD_10SEC )
{
Feedback( p_intf, _( "Jump -10 seconds" ) );
input_Seek( p_input, -10, INPUT_SEEK_SECONDS|INPUT_SEEK_CUR );
}
else if( i_action == ACTIONID_JUMP_FORWARD_10SEC )
{
Feedback( p_intf, _( "Jump +10 seconds" ) );
input_Seek( p_input, 10, INPUT_SEEK_SECONDS|INPUT_SEEK_CUR );
}
else if( i_action == ACTIONID_JUMP_BACKWARD_1MIN )
{
Feedback( p_intf, _( "Jump -1 minute" ) );
input_Seek( p_input, -60, INPUT_SEEK_SECONDS|INPUT_SEEK_CUR );
}
else if( i_action == ACTIONID_JUMP_FORWARD_1MIN )
{
Feedback( p_intf, _( "Jump +1 minute" ) );
input_Seek( p_input, 60, INPUT_SEEK_SECONDS|INPUT_SEEK_CUR );
}
else if( i_action == ACTIONID_JUMP_BACKWARD_5MIN )
{
Feedback( p_intf, _( "Jump -5 minutes" ) );
input_Seek( p_input, -300, INPUT_SEEK_SECONDS|INPUT_SEEK_CUR );
}
else if( i_action == ACTIONID_JUMP_FORWARD_5MIN )
{
Feedback( p_intf, _( "Jump +5 minutes" ) );
input_Seek( p_input, 300, INPUT_SEEK_SECONDS|INPUT_SEEK_CUR );
}
else if( i_action == ACTIONID_NEXT )
{
p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
......@@ -320,7 +350,8 @@ static void Feedback( intf_thread_t *p_intf, char *psz_string )
if ( p_intf->p_sys->p_vout )
{
vout_ShowTextRelative( p_intf->p_sys->p_vout, psz_string, NULL,
OSD_ALIGN_TOP|OSD_ALIGN_RIGHT, 30,20,400000 );
OSD_ALIGN_TOP | OSD_ALIGN_RIGHT,
30, 20, 1500000 );
}
}
......
......@@ -2,7 +2,7 @@
* libvlc.h: main libvlc header
*****************************************************************************
* Copyright (C) 1998-2002 VideoLAN
* $Id: libvlc.h,v 1.98 2003/10/29 01:33:27 gbazin Exp $
* $Id: libvlc.h,v 1.99 2003/10/30 17:58:07 gbazin Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -515,6 +515,23 @@ static char *ppsz_language[] = { "auto", "en", "en_GB", "es", "de", "fr", "it",
#define PREV_KEY_LONGTEXT N_("Select the hotkey to use to skip to the previous item in the playlist")
#define STOP_KEY_TEXT N_("Stop")
#define STOP_KEY_LONGTEXT N_("Select the hotkey to stop the playback")
#define JB10SEC_KEY_TEXT N_("Jump backward 10 seconds")
#define JB10SEC_KEY_LONGTEXT N_("Select the hotkey to jump backward by 10 seconds")
#define JB1MIN_KEY_TEXT N_("Jump backward 1 minute")
#define JB1MIN_KEY_LONGTEXT N_("Select the hotkey to jump backward by 1 minute")
#define JB5MIN_KEY_TEXT N_("Jump backward 5 minutes")
#define JB5MIN_KEY_LONGTEXT N_("Select the hotkey to jump backward by 5 minutes")
#define JF10SEC_KEY_TEXT N_("Jump forward 10 seconds")
#define JF10SEC_KEY_LONGTEXT N_("Select the hotkey to jump forward by 10 seconds")
#define JF1MIN_KEY_TEXT N_("Jump forward 1 minute")
#define JF1MIN_KEY_LONGTEXT N_("Select the hotkey to jump forward by 1 minute")
#define JF5MIN_KEY_TEXT N_("Jump forward 5 minutes")
#define JF5MIN_KEY_LONGTEXT N_("Select the hotkey to jump forward by 5 minutes")
#define QUIT_KEY_TEXT N_("Quit")
#define QUIT_KEY_LONGTEXT N_("Select the hotkey to quit the application")
#define NAV_UP_KEY_TEXT N_("Navigate up")
......@@ -728,6 +745,12 @@ vlc_module_begin();
add_key( "key-next", 'n', NULL, NEXT_KEY_TEXT, NEXT_KEY_LONGTEXT, VLC_FALSE );
add_key( "key-prev", 'p', NULL, PREV_KEY_TEXT, PREV_KEY_LONGTEXT, VLC_FALSE );
add_key( "key-stop", 's', NULL, STOP_KEY_TEXT, STOP_KEY_LONGTEXT, VLC_FALSE );
add_key( "key-jump-10sec", KEY_MODIFIER_ALT|KEY_LEFT, NULL, JB10SEC_KEY_TEXT, JB10SEC_KEY_LONGTEXT, VLC_FALSE );
add_key( "key-jump+10sec", KEY_MODIFIER_ALT|KEY_RIGHT, NULL, JF10SEC_KEY_TEXT, JF10SEC_KEY_LONGTEXT, VLC_FALSE );
add_key( "key-jump-1min", KEY_MODIFIER_CTRL|KEY_LEFT, NULL, JB1MIN_KEY_TEXT, JB1MIN_KEY_LONGTEXT, VLC_FALSE );
add_key( "key-jump+1min", KEY_MODIFIER_CTRL|KEY_RIGHT, NULL, JF1MIN_KEY_TEXT, JF1MIN_KEY_LONGTEXT, VLC_FALSE );
add_key( "key-jump-5min", KEY_MODIFIER_CTRL|KEY_MODIFIER_ALT|KEY_LEFT, NULL, JB5MIN_KEY_TEXT, JB5MIN_KEY_LONGTEXT, VLC_FALSE );
add_key( "key-jump+5min", KEY_MODIFIER_CTRL|KEY_MODIFIER_ALT|KEY_RIGHT, NULL, JF5MIN_KEY_TEXT, JF5MIN_KEY_LONGTEXT, VLC_FALSE );
add_key( "key-nav-activate", KEY_ENTER, NULL, NAV_ACTIVATE_KEY_TEXT, NAV_ACTIVATE_KEY_LONGTEXT, VLC_FALSE );
add_key( "key-nav-up", KEY_UP, NULL, NAV_UP_KEY_TEXT, NAV_UP_KEY_LONGTEXT, VLC_FALSE );
add_key( "key-nav-down", KEY_DOWN, NULL, NAV_DOWN_KEY_TEXT, NAV_DOWN_KEY_LONGTEXT, VLC_FALSE );
......@@ -779,6 +802,12 @@ static struct hotkey p_hotkeys[] =
{ "key-play", ACTIONID_PLAY, 0 },
{ "key-pause", ACTIONID_PAUSE, 0 },
{ "key-stop", ACTIONID_STOP, 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 },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment