1
mirror of https://github.com/mpv-player/mpv synced 2024-12-28 06:03:45 +01:00

Add an option to disable the default key binding that MPlayer includes

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28878 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2009-03-08 09:14:30 +00:00
parent e46d74d4ae
commit 4a5c933303
2 changed files with 6 additions and 1 deletions

View File

@ -960,6 +960,8 @@ Device to be used for Apple IR Remote (default is autodetected, Linux only).
Delay in milliseconds before we start to autorepeat a key (0 to disable).
.IPs ar-rate
Number of key presses to generate per second on autorepeat.
.IPs (no)default-binds
Use the key bindings that MPlayer ships with by default.
.IPs keylist
Prints all keys that can be bound to commands.
.IPs cmdlist

View File

@ -583,6 +583,7 @@ static mp_cmd_t* ar_cmd = NULL;
static unsigned int ar_delay = 100, ar_rate = 8, last_ar = 0;
static int use_joystick = 1, use_lirc = 1, use_lircc = 1;
static int default_binds = 1;
static char* config_file = "input.conf";
/* Apple Remote */
@ -611,6 +612,8 @@ static m_option_t input_conf[] = {
{ "cmdlist", mp_input_print_cmd_list, CONF_TYPE_FUNC, CONF_GLOBAL, 0, 0, NULL },
{ "js-dev", &js_dev, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL },
{ "file", &in_file, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL },
{ "default-binds", &default_binds, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL },
{ "nodefault-binds", &default_binds, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL },
{ NULL, NULL, 0, 0, 0, 0, NULL}
};
@ -1078,7 +1081,7 @@ mp_input_get_cmd_from_keys(int n,int* keys, int paused) {
cmd = mp_input_find_bind_for_key(cmd_binds,n,keys);
if(cmd_binds_default && cmd == NULL)
cmd = mp_input_find_bind_for_key(cmd_binds_default,n,keys);
if(cmd == NULL)
if(default_binds && cmd == NULL)
cmd = mp_input_find_bind_for_key(def_cmd_binds,n,keys);
if(cmd == NULL) {