From a986e2a1f68b1145d51f9b63c70cd0df9731e950 Mon Sep 17 00:00:00 2001 From: ulion Date: Tue, 4 Dec 2007 10:42:59 +0000 Subject: Remove hardcoded key->cmd bindings in libmenu, support custom key bindings by menu config file. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25291 b3059339-0415-0410-9bf9-f77b7e298cf2 --- input/input.c | 2 +- input/input.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'input') diff --git a/input/input.c b/input/input.c index 575970bd73..e92cc3f13c 100644 --- a/input/input.c +++ b/input/input.c @@ -1373,7 +1373,7 @@ mp_input_get_key_name(int key) { } -static int +int mp_input_get_key_from_name(const char *name) { int i,ret = 0,len = strlen(name); if(len == 1) { // Direct key code diff --git a/input/input.h b/input/input.h index 3dc7598f64..6ed71c4320 100644 --- a/input/input.h +++ b/input/input.h @@ -238,6 +238,9 @@ int mp_input_add_event_fd(int fd, void (*read_func)(void)); void mp_input_rm_event_fd(int fd); +/// Get input key from its name. +int mp_input_get_key_from_name(const char *name); + // This function can be used to put a command in the system again. It's used by libmpdemux // when it performs a blocking operation to resend the command it received to the main // loop. -- cgit v1.2.3