changeset 28843:9a5655b78698

Add an option to disable the default key binding that MPlayer includes
author reimar
date Sun, 08 Mar 2009 09:14:30 +0000
parents e9ba9214fabe
children d7d6e9496609
files DOCS/man/en/mplayer.1 input/input.c
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/DOCS/man/en/mplayer.1	Sun Mar 08 08:56:28 2009 +0000
+++ b/DOCS/man/en/mplayer.1	Sun Mar 08 09:14:30 2009 +0000
@@ -960,6 +960,8 @@
 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
--- a/input/input.c	Sun Mar 08 08:56:28 2009 +0000
+++ b/input/input.c	Sun Mar 08 09:14:30 2009 +0000
@@ -583,6 +583,7 @@
 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 @@
   { "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 @@
     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) {