Commit 764f9e8b authored by hartman's avatar hartman

* include/vlc_keys.h: added StringToKey()

* src/libvlc.h: added macosx defaults and changed the quit shortcut to ctrl-q
* modeules/gui/macosx/controls.m: now jump 10 seconds. works better than 5
* REST: implemented configurable hotkeys for OS X.
parent 0f04eb53
......@@ -2,7 +2,7 @@
* hotkeys.h: keycode defines
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: vlc_keys.h,v 1.7 2003/11/08 18:23:40 titer Exp $
* $Id: vlc_keys.h,v 1.8 2003/11/11 23:50:41 hartman Exp $
*
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
*
......@@ -146,7 +146,6 @@ static const struct key_descriptor_s vlc_keys[] =
{ "[", '[' },
{ "]", ']' },
{ "*", '*' }
};
static inline char *KeyToString( int i_key )
......@@ -162,6 +161,20 @@ static inline char *KeyToString( int i_key )
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 NULL;
}
#define ACTIONID_QUIT 1
#define ACTIONID_PLAY_PAUSE 2
#define ACTIONID_PLAY 3
......
......@@ -2,7 +2,7 @@
* controls.m: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: controls.m,v 1.52 2003/11/06 18:55:22 hartman Exp $
* $Id: controls.m,v 1.53 2003/11/11 23:50:41 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
......@@ -301,7 +301,7 @@
if( p_input != NULL )
{
vlc_value_t time;
time.i_time = 5 * 1000000;
time.i_time = 10 * 1000000;
var_Set( p_input, "time-offset", time );
vlc_object_release( p_input );
}
......@@ -315,7 +315,7 @@
if( p_input != NULL )
{
vlc_value_t time;
time.i_time = -5 * 1000000;
time.i_time = -10 * 1000000;
var_Set( p_input, "time-offset", time );
vlc_object_release( p_input );
}
......
......@@ -2,7 +2,7 @@
* intf.h: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: intf.h,v 1.47 2003/11/03 15:27:28 hartman Exp $
* $Id: intf.h,v 1.48 2003/11/11 23:50:41 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
......@@ -56,7 +56,7 @@
int ExecuteOnMainThread( id target, SEL sel, void * p_arg );
int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable,
vlc_value_t old_val, vlc_value_t new_val, void *param );
int CocoaConvertKey( unichar i_key);
unsigned int CocoaKeyToVLC( unichar i_key );
/*****************************************************************************
* intf_sys_t: description and status of the interface
......@@ -226,9 +226,10 @@ struct intf_sys_t
}
- (id)getControls;
- (void)terminate;
- (void)initStrings;
- (void)manage;
- (void)manageIntf:(NSTimer *)o_timer;
- (void)setupMenus;
......
......@@ -2,7 +2,7 @@
* intf.m: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: intf.m,v 1.99 2003/11/06 18:35:19 hartman Exp $
* $Id: intf.m,v 1.100 2003/11/11 23:50:41 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
......@@ -293,7 +293,7 @@ int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable,
static struct
{
unichar i_nskey;
int i_vlckey;
unsigned int i_vlckey;
} nskeys_to_vlckeys[] =
{
{ NSUpArrowFunctionKey, KEY_UP },
......@@ -325,9 +325,23 @@ static struct
{0,0}
};
int CocoaConvertKey( unichar i_key )
unichar VLCKeyToCocoa( unsigned int i_key )
{
int i;
unsigned int i;
for( i = 0; nskeys_to_vlckeys[i].i_vlckey != 0; i++ )
{
if( nskeys_to_vlckeys[i].i_vlckey == (i_key & ~KEY_MODIFIER) )
{
return nskeys_to_vlckeys[i].i_nskey;
}
}
return (unichar)(i_key & ~KEY_MODIFIER);
}
unsigned int CocoaKeyToVLC( unichar i_key )
{
unsigned int i;
for( i = 0; nskeys_to_vlckeys[i].i_nskey != 0; i++ )
{
......@@ -336,7 +350,21 @@ int CocoaConvertKey( unichar i_key )
return nskeys_to_vlckeys[i].i_vlckey;
}
}
return (int)i_key;
return (unsigned int)i_key;
}
unsigned int VLCModifiersToCocoa( unsigned int i_key )
{
unsigned int new = 0;
if( i_key & KEY_MODIFIER_COMMAND )
new |= NSCommandKeyMask;
if( i_key & KEY_MODIFIER_ALT )
new |= NSAlternateKeyMask;
if( i_key & KEY_MODIFIER_SHIFT )
new |= NSShiftKeyMask;
if( i_key & KEY_MODIFIER_CTRL )
new |= NSControlKeyMask;
return new;
}
/*****************************************************************************
......@@ -346,8 +374,59 @@ int CocoaConvertKey( unichar i_key )
- (void)awakeFromNib
{
[o_window setTitle: _NS("VLC - Controller")];
unsigned int i_key;
intf_thread_t * p_intf = [NSApp getIntf];
[self initStrings];
[o_window setExcludedFromWindowsMenu: TRUE];
[o_msgs_panel setExcludedFromWindowsMenu: TRUE];
[o_msgs_panel setDelegate: self];
i_key = config_GetInt( p_intf, "key-quit" );
[o_mi_quit setKeyEquivalent: [NSString stringWithFormat:@"%C", VLCKeyToCocoa( i_key )]];
[o_mi_quit setKeyEquivalentModifierMask: VLCModifiersToCocoa(i_key)];
i_key = config_GetInt( p_intf, "key-play-pause" );
[o_mi_play setKeyEquivalent: [NSString stringWithFormat:@"%C", VLCKeyToCocoa( i_key )]];
[o_mi_play setKeyEquivalentModifierMask: VLCModifiersToCocoa(i_key)];
i_key = config_GetInt( p_intf, "key-stop" );
[o_mi_stop setKeyEquivalent: [NSString stringWithFormat:@"%C", VLCKeyToCocoa( i_key )]];
[o_mi_stop setKeyEquivalentModifierMask: VLCModifiersToCocoa(i_key)];
i_key = config_GetInt( p_intf, "key-faster" );
[o_mi_faster setKeyEquivalent: [NSString stringWithFormat:@"%C", VLCKeyToCocoa( i_key )]];
[o_mi_faster setKeyEquivalentModifierMask: VLCModifiersToCocoa(i_key)];
i_key = config_GetInt( p_intf, "key-slower" );
[o_mi_slower setKeyEquivalent: [NSString stringWithFormat:@"%C", VLCKeyToCocoa( i_key )]];
[o_mi_slower setKeyEquivalentModifierMask: VLCModifiersToCocoa(i_key)];
i_key = config_GetInt( p_intf, "key-prev" );
[o_mi_previous setKeyEquivalent: [NSString stringWithFormat:@"%C", VLCKeyToCocoa( i_key )]];
[o_mi_previous setKeyEquivalentModifierMask: VLCModifiersToCocoa(i_key)];
i_key = config_GetInt( p_intf, "key-next" );
[o_mi_next setKeyEquivalent: [NSString stringWithFormat:@"%C", VLCKeyToCocoa( i_key )]];
[o_mi_next setKeyEquivalentModifierMask: VLCModifiersToCocoa(i_key)];
i_key = config_GetInt( p_intf, "key-jump+10sec" );
[o_mi_fwd setKeyEquivalent: [NSString stringWithFormat:@"%C", VLCKeyToCocoa( i_key )]];
[o_mi_fwd setKeyEquivalentModifierMask: VLCModifiersToCocoa(i_key)];
i_key = config_GetInt( p_intf, "key-jump-10sec" );
[o_mi_bwd setKeyEquivalent: [NSString stringWithFormat:@"%C", VLCKeyToCocoa( i_key )]];
[o_mi_bwd setKeyEquivalentModifierMask: VLCModifiersToCocoa(i_key)];
i_key = config_GetInt( p_intf, "key-vol-up" );
[o_mi_vol_up setKeyEquivalent: [NSString stringWithFormat:@"%C", VLCKeyToCocoa( i_key )]];
[o_mi_vol_up setKeyEquivalentModifierMask: VLCModifiersToCocoa(i_key)];
i_key = config_GetInt( p_intf, "key-vol-down" );
[o_mi_vol_down setKeyEquivalent: [NSString stringWithFormat:@"%C", VLCKeyToCocoa( i_key )]];
[o_mi_vol_down setKeyEquivalentModifierMask: VLCModifiersToCocoa(i_key)];
i_key = config_GetInt( p_intf, "key-fullscreen" );
[o_mi_fullscreen setKeyEquivalent: [NSString stringWithFormat:@"%C", VLCKeyToCocoa( i_key )]];
[o_mi_fullscreen setKeyEquivalentModifierMask: VLCModifiersToCocoa(i_key)];
[self setSubmenusEnabled: FALSE];
[self manageVolumeSlider];
}
- (void)initStrings
{
[o_window setTitle: _NS("VLC - Controller")];
/* button controls */
[o_btn_playlist setToolTip: _NS("Playlist")];
......@@ -362,9 +441,7 @@ int CocoaConvertKey( unichar i_key )
[o_timeslider setToolTip: _NS("Position")];
/* messages panel */
[o_msgs_panel setDelegate: self];
[o_msgs_panel setTitle: _NS("Messages")];
[o_msgs_panel setExcludedFromWindowsMenu: TRUE];
[o_msgs_btn_crashlog setTitle: _NS("Open CrashLog")];
/* main menu */
......@@ -469,9 +546,6 @@ int CocoaConvertKey( unichar i_key )
[o_err_btn_dismiss setTitle: _NS("Dismiss")];
[o_info_window setTitle: _NS("Info")];
[self setSubmenusEnabled: FALSE];
[self manageVolumeSlider];
}
- (void)applicationWillFinishLaunching:(NSNotification *)o_notification
......
......@@ -2,7 +2,7 @@
* prefs.h: MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: prefs.h,v 1.11 2003/06/21 22:30:21 hartman Exp $
* $Id: prefs.h,v 1.12 2003/11/11 23:50:41 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
*
......@@ -160,6 +160,7 @@ INTF_CONTROL_CONFIG(PopUpButton);
INTF_CONTROL_CONFIG(ComboBox);
INTF_CONTROL_CONFIG(TextField);
INTF_CONTROL_CONFIG(Slider);
INTF_CONTROL_CONFIG(Matrix);
#define CONTROL_CONFIG( obj, mname, ctype, cname ) \
{ \
......
......@@ -2,7 +2,7 @@
* prefs.m: MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: prefs.m,v 1.34 2003/09/19 23:03:27 hartman Exp $
* $Id: prefs.m,v 1.35 2003/11/11 23:50:41 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Derk-Jan Hartman <thedj at users.sf.net>
......@@ -31,6 +31,7 @@
#include "intf.h"
#include "prefs.h"
#include "vlc_keys.h"
/*****************************************************************************
* VLCPrefs implementation
......@@ -128,9 +129,7 @@
case CONFIG_ITEM_DIRECTORY:
{
char *psz_value;
NSString *o_value;
o_value = [o_vlc_config stringValue];
NSString *o_value = [o_vlc_config stringValue];
psz_value = (char *)[o_value UTF8String];
config_PutPsz( p_intf, psz_name, psz_value );
......@@ -153,7 +152,43 @@
config_PutFloat( p_intf, psz_name, f_value );
}
break;
case CONFIG_ITEM_KEY:
{
unsigned int i_key = config_GetInt( p_intf, psz_name );
unsigned int i_new_key = 0;
if( [o_vlc_config class] == [VLCMatrix class] )
{
int i;
NSButtonCell *o_current_cell;
NSArray *o_cells = [o_vlc_config cells];
i_new_key = (i_key & ~KEY_MODIFIER);
for( i = 0; i < [o_cells count]; i++ )
{
o_current_cell = [o_cells objectAtIndex:i];
if( [[o_current_cell title] isEqualToString:_NS("Command")] &&
[o_current_cell state] == NSOnState )
i_new_key |= KEY_MODIFIER_COMMAND;
if( [[o_current_cell title] isEqualToString:_NS("Control")] &&
[o_current_cell state] == NSOnState )
i_new_key |= KEY_MODIFIER_CTRL;
if( [[o_current_cell title] isEqualToString:_NS("Option/Alt")] &&
[o_current_cell state] == NSOnState )
i_new_key |= KEY_MODIFIER_ALT;
if( [[o_current_cell title] isEqualToString:_NS("Shift")] &&
[o_current_cell state] == NSOnState )
i_new_key |= KEY_MODIFIER_SHIFT;
}
}
else
{
i_new_key = (i_key & KEY_MODIFIER);
i_new_key |= StringToKey([[o_vlc_config stringValue] cString]);
}
config_PutInt( p_intf, psz_name, i_new_key );
}
break;
}
}
config_SaveConfigFile( p_intf, NULL );
......@@ -516,7 +551,7 @@
if ( p_item->psz_longtext != NULL )
psz_duptip = strdup( p_item->psz_longtext );
s_rc.size.height = 27;
s_rc.size.height = 25;
s_rc.size.width = 200;
s_rc.origin.y += 10;
......@@ -528,6 +563,10 @@
[o_combo_box setTarget: self];
[o_combo_box setAction: @selector(configChanged:)];
[o_combo_box sendActionOn:NSLeftMouseUpMask];
[[NSNotificationCenter defaultCenter] addObserver: self
selector: @selector(configChanged:)
name: NSControlTextDidChangeNotification
object: o_combo_box];
if ( psz_duptip != NULL )
{
......@@ -675,6 +714,101 @@
s_rc.origin.y += s_rc.size.height;
}
break;
case CONFIG_ITEM_KEY:
{
int i;
char *psz_duptip = NULL;
VLCComboBox *o_combo_box;
if ( p_item->psz_longtext != NULL )
psz_duptip = strdup( p_item->psz_longtext );
s_rc.origin.y += 10;
s_rc.size.width = - 10;
s_rc.size.height = 20;
CHECK_VIEW_HEIGHT;
CONTROL_LABEL( p_item->psz_text );
s_rc.origin.x = X_ORIGIN;
s_rc.origin.y += s_rc.size.height;
s_rc.size.width = s_vrc.size.width - X_ORIGIN * 2;
CHECK_VIEW_HEIGHT;
VLCMatrix *o_matrix = [[VLCMatrix alloc] initWithFrame: s_rc mode: NSHighlightModeMatrix cellClass: [NSButtonCell class] numberOfRows:2 numberOfColumns:2];
NSArray *o_cells = [o_matrix cells];
for( i=0; i < [o_cells count]; i++ )
{
NSButtonCell *o_current_cell = [o_cells objectAtIndex:i];
[o_current_cell setButtonType: NSSwitchButton];
[o_current_cell setControlSize: NSSmallControlSize];
if( psz_duptip != NULL )
{
[o_matrix setToolTip: [NSApp wrapString: [NSApp localizedString: psz_duptip] toWidth: PREFS_WRAP] forCell: o_current_cell];
}
switch( i )
{
case 0:
[o_current_cell setTitle:_NS("Command")];
[o_current_cell setState: p_item->i_value & KEY_MODIFIER_COMMAND];
break;
case 1:
[o_current_cell setTitle:_NS("Control")];
[o_current_cell setState: p_item->i_value & KEY_MODIFIER_CTRL];
break;
case 2:
[o_current_cell setTitle:_NS("Option/Alt")];
[o_current_cell setState: p_item->i_value & KEY_MODIFIER_ALT];
break;
case 3:
[o_current_cell setTitle:_NS("Shift")];
[o_current_cell setState: p_item->i_value & KEY_MODIFIER_SHIFT];
break;
}
[o_current_cell setTarget: self];
[o_current_cell setAction: @selector(configChanged:)];
[o_current_cell sendActionOn:NSLeftMouseUpMask];
}
CONTROL_CONFIG( o_matrix, o_module_name,
CONFIG_ITEM_KEY, p_item->psz_name );
[o_matrix sizeToCells];
[o_view addSubview: [o_matrix autorelease]];
s_rc.origin.x += [o_matrix frame].size.width + 20;
s_rc.size.height = 25;
s_rc.size.width = 100;
CHECK_VIEW_HEIGHT;
o_combo_box = [[VLCComboBox alloc] initWithFrame: s_rc];
CONTROL_CONFIG( o_combo_box, o_module_name,
CONFIG_ITEM_KEY, p_item->psz_name );
[o_combo_box setTarget: self];
[o_combo_box setAction: @selector(configChanged:)];
[o_combo_box sendActionOn:NSLeftMouseUpMask];
[[NSNotificationCenter defaultCenter] addObserver: self
selector: @selector(configChanged:)
name: NSControlTextDidChangeNotification
object: o_combo_box];
if ( psz_duptip != NULL )
{
[o_combo_box setToolTip: [NSApp wrapString: [NSApp localizedString: psz_duptip] toWidth: PREFS_WRAP]];
}
[o_view addSubview: [o_combo_box autorelease]];
for( i = 0; i < sizeof(vlc_keys) / sizeof(key_descriptor_t); i++ )
{
if( vlc_keys[i].psz_key_string && *vlc_keys[i].psz_key_string )
[o_combo_box addItemWithObjectValue: [NSApp localizedString:vlc_keys[i].psz_key_string]];
}
[o_combo_box setStringValue: [NSApp localizedString:KeyToString(( ((unsigned int)p_item->i_value) & ~KEY_MODIFIER ))]];
s_rc.origin.y += s_rc.size.height;
s_rc.origin.x = X_ORIGIN;
if( psz_duptip ) free( psz_duptip );
}
break;
}
......@@ -1009,3 +1143,4 @@ IMPL_CONTROL_CONFIG(PopUpButton);
IMPL_CONTROL_CONFIG(ComboBox);
IMPL_CONTROL_CONFIG(TextField);
IMPL_CONTROL_CONFIG(Slider);
IMPL_CONTROL_CONFIG(Matrix);
......@@ -3,7 +3,7 @@
* vout.m: MacOS X video output plugin
*****************************************************************************
* Copyright (C) 2001-2003 VideoLAN
* $Id: vout.m,v 1.63 2003/11/06 16:28:28 hartman Exp $
* $Id: vout.m,v 1.64 2003/11/11 23:50:41 hartman Exp $
*
* Authors: Colin Delacroix <colin@zoy.org>
* Florian G. Pflug <fgp@phlo.org>
......@@ -995,7 +995,7 @@ static void QTFreePicture( vout_thread_t *p_vout, picture_t *p_pic )
}
else
{
val.i_int |= CocoaConvertKey( key );
val.i_int |= CocoaKeyToVLC( key );
var_Set( p_vout->p_vlc, "key-pressed", val );
}
}
......
......@@ -2,7 +2,7 @@
* libvlc.h: main libvlc header
*****************************************************************************
* Copyright (C) 1998-2002 VideoLAN
* $Id: libvlc.h,v 1.103 2003/11/10 00:49:48 hartman Exp $
* $Id: libvlc.h,v 1.104 2003/11/11 23:50:41 hartman Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -769,6 +769,31 @@ vlc_module_begin();
/* Hotkey options*/
add_category_hint( N_("Hot keys"), HOTKEY_CAT_LONGTEXT , VLC_FALSE );
#if defined(SYS_DARWIN)
add_key( "key-fullscreen", KEY_MODIFIER_COMMAND|'f', NULL, FULLSCREEN_KEY_TEXT, FULLSCREEN_KEY_LONGTEXT, VLC_FALSE );
add_key( "key-play-pause", KEY_MODIFIER_COMMAND|'p', NULL, PLAY_PAUSE_KEY_TEXT, PLAY_PAUSE_KEY_LONGTEXT, VLC_FALSE );
add_key( "key-pause", 0, NULL, PAUSE_KEY_TEXT, PAUSE_KEY_LONGTEXT, VLC_TRUE );
add_key( "key-play", 0, NULL, PLAY_KEY_TEXT, PLAY_KEY_LONGTEXT, VLC_TRUE );
add_key( "key-faster", KEY_MODIFIER_COMMAND|'=', NULL, FASTER_KEY_TEXT, FASTER_KEY_LONGTEXT, VLC_FALSE );
add_key( "key-slower", KEY_MODIFIER_COMMAND|'-', NULL, SLOWER_KEY_TEXT, SLOWER_KEY_LONGTEXT, VLC_FALSE );
add_key( "key-next", KEY_MODIFIER_COMMAND|KEY_RIGHT, NULL, NEXT_KEY_TEXT, NEXT_KEY_LONGTEXT, VLC_FALSE );
add_key( "key-prev", KEY_MODIFIER_COMMAND|KEY_LEFT, NULL, PREV_KEY_TEXT, PREV_KEY_LONGTEXT, VLC_FALSE );
add_key( "key-stop", KEY_MODIFIER_COMMAND|'.', NULL, STOP_KEY_TEXT, STOP_KEY_LONGTEXT, VLC_FALSE );
add_key( "key-jump-10sec", KEY_MODIFIER_COMMAND|KEY_MODIFIER_ALT|KEY_LEFT, NULL, JB10SEC_KEY_TEXT, JB10SEC_KEY_LONGTEXT, VLC_FALSE );
add_key( "key-jump+10sec", KEY_MODIFIER_COMMAND|KEY_MODIFIER_ALT|KEY_RIGHT, NULL, JF10SEC_KEY_TEXT, JF10SEC_KEY_LONGTEXT, VLC_FALSE );
add_key( "key-jump-1min", KEY_MODIFIER_COMMAND|KEY_MODIFIER_SHIFT|KEY_LEFT, NULL, JB1MIN_KEY_TEXT, JB1MIN_KEY_LONGTEXT, VLC_FALSE );
add_key( "key-jump+1min", KEY_MODIFIER_COMMAND|KEY_MODIFIER_SHIFT|KEY_RIGHT, NULL, JF1MIN_KEY_TEXT, JF1MIN_KEY_LONGTEXT, VLC_FALSE );
add_key( "key-jump-5min", KEY_MODIFIER_COMMAND|KEY_MODIFIER_SHIFT|KEY_MODIFIER_ALT|KEY_LEFT, NULL, JB5MIN_KEY_TEXT, JB5MIN_KEY_LONGTEXT, VLC_FALSE );
add_key( "key-jump+5min", KEY_MODIFIER_COMMAND|KEY_MODIFIER_SHIFT|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 );
add_key( "key-nav-left", KEY_LEFT, NULL, NAV_LEFT_KEY_TEXT, NAV_LEFT_KEY_LONGTEXT, VLC_FALSE );
add_key( "key-nav-right", KEY_RIGHT, NULL, NAV_RIGHT_KEY_TEXT, NAV_RIGHT_KEY_LONGTEXT, VLC_FALSE );
add_key( "key-quit", KEY_MODIFIER_COMMAND|'q', NULL, QUIT_KEY_TEXT, QUIT_KEY_LONGTEXT, VLC_FALSE );
add_key( "key-vol-up", KEY_MODIFIER_COMMAND|KEY_UP, NULL, VOL_UP_KEY_TEXT, VOL_UP_KEY_LONGTEXT, VLC_FALSE );
add_key( "key-vol-down", KEY_MODIFIER_COMMAND|KEY_DOWN, NULL, VOL_DOWN_KEY_TEXT, VOL_DOWN_KEY_LONGTEXT, VLC_FALSE );
#else
add_key( "key-fullscreen", 'f', NULL, FULLSCREEN_KEY_TEXT, FULLSCREEN_KEY_LONGTEXT, VLC_FALSE );
add_key( "key-play-pause", KEY_SPACE, NULL, PLAY_PAUSE_KEY_TEXT, PLAY_PAUSE_KEY_LONGTEXT, VLC_FALSE );
add_key( "key-pause", 0, NULL, PAUSE_KEY_TEXT, PAUSE_KEY_LONGTEXT, VLC_TRUE );
......@@ -789,9 +814,10 @@ vlc_module_begin();
add_key( "key-nav-down", KEY_DOWN, NULL, NAV_DOWN_KEY_TEXT, NAV_DOWN_KEY_LONGTEXT, VLC_FALSE );
add_key( "key-nav-left", KEY_LEFT, NULL, NAV_LEFT_KEY_TEXT, NAV_LEFT_KEY_LONGTEXT, VLC_FALSE );
add_key( "key-nav-right", KEY_RIGHT, NULL, NAV_RIGHT_KEY_TEXT, NAV_RIGHT_KEY_LONGTEXT, VLC_FALSE );
add_key( "key-quit", KEY_MODIFIER_CTRL|KEY_SPACE, NULL, QUIT_KEY_TEXT, QUIT_KEY_LONGTEXT, VLC_FALSE );
add_key( "key-quit", KEY_MODIFIER_CTRL|'q', NULL, QUIT_KEY_TEXT, QUIT_KEY_LONGTEXT, VLC_FALSE );
add_key( "key-vol-up", 'a', NULL, VOL_UP_KEY_TEXT, VOL_UP_KEY_LONGTEXT, VLC_FALSE );
add_key( "key-vol-down", 'z', NULL, VOL_DOWN_KEY_TEXT, VOL_DOWN_KEY_LONGTEXT, VLC_FALSE );
#endif
/* Usage (mainly useful for cmd line stuff) */
add_usage_hint( PLAYLIST_USAGE );
......
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