diff options
author | wm4 <wm4@nowhere> | 2013-12-26 17:10:35 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-12-26 17:13:25 +0100 |
commit | 34bee16faf64d1f0e4e6f28549731c7d8570baa3 (patch) | |
tree | 1ad93bc4f91767b83033aa052a2e7edd20148b96 /input/keycodes.h | |
parent | 652895abdce4bc1ff2f00c7f21c0d0d722680806 (diff) | |
download | mpv-34bee16faf64d1f0e4e6f28549731c7d8570baa3.tar.bz2 mpv-34bee16faf64d1f0e4e6f28549731c7d8570baa3.tar.xz |
input: split off some code from input.c to separate files
This is mostly just moving code around.
Diffstat (limited to 'input/keycodes.h')
-rw-r--r-- | input/keycodes.h | 18 |
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 */ |