summaryrefslogtreecommitdiffstats
path: root/input/keycodes.h
diff options
context:
space:
mode:
Diffstat (limited to 'input/keycodes.h')
-rw-r--r--input/keycodes.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/input/keycodes.h b/input/keycodes.h
index 23aa634b5e..827aee7ba7 100644
--- a/input/keycodes.h
+++ b/input/keycodes.h
@@ -21,6 +21,8 @@
#ifndef MPLAYER_KEYCODES_H
#define MPLAYER_KEYCODES_H
+// Key in the range [0, MP_KEY_BASE) follow unicode.
+// Special keys come after this.
#define MP_KEY_BASE (1<<21)
#define MP_KEY_ENTER 13
@@ -251,4 +253,20 @@
// Also means both key-down key-up events produce emit bound commands.
#define MP_NO_REPEAT_KEY (1<<29)
+// Get input key from its name.
+int mp_input_get_key_from_name(const char *name);
+
+// Append given key by name to ret, return ret.
+char *mp_input_get_key_name(int key, char *ret);
+
+// Combination of multiple keys to string.
+char *mp_input_get_key_combo_name(int *keys, int max);
+
+// String containing combination of multiple string to keys.
+int mp_input_get_keys_from_string(char *str, int max_num_keys,
+ int *out_num_keys, int *keys);
+
+struct mp_log;
+void mp_print_key_list(struct mp_log *out);
+
#endif /* MPLAYER_KEYCODES_H */