summaryrefslogtreecommitdiffstats
path: root/mp_fifo.h
diff options
context:
space:
mode:
authorwm4 <wm4@mplayer2.org>2012-01-13 07:38:40 +0100
committerUoti Urpala <uau@mplayer2.org>2012-03-25 22:30:37 +0300
commit166a7de4cf94a78c34040b47a929a72d12f2945f (patch)
tree3b326a949d7add071c3dc92a1ab1eb5d86e194da /mp_fifo.h
parent3e6e80a32c04e38c7d2fa77e4bcf1401e792dc7a (diff)
downloadmpv-166a7de4cf94a78c34040b47a929a72d12f2945f.tar.bz2
mpv-166a7de4cf94a78c34040b47a929a72d12f2945f.tar.xz
input: allow unicode keys and reassign internal key codes
This moves all key codes above the highest valid unicode code point (which is 0x10FFFF). All key codes below MP_KEY_BASE now directly map to unicode (KEY_ENTER is 13, carriage return). Configuration files (input.conf) can contain unicode characters in UTF-8 to map non-ASCII characters/keys. This shouldn't change anything user visible, except that "direct key codes" (as used in input.conf) will change their meaning. Parts of the bstr functions taken from libavutil's GET_UTF8 and slightly modified.
Diffstat (limited to 'mp_fifo.h')
-rw-r--r--mp_fifo.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/mp_fifo.h b/mp_fifo.h
index 01c1fb0c37..aa7fde0f29 100644
--- a/mp_fifo.h
+++ b/mp_fifo.h
@@ -19,8 +19,11 @@
#ifndef MPLAYER_MP_FIFO_H
#define MPLAYER_MP_FIFO_H
+#include "bstr.h"
+
struct mp_fifo;
void mplayer_put_key(struct mp_fifo *fifo, int code);
+void mplayer_put_key_utf8(struct mp_fifo *fifo, int mods, struct bstr code);
// Can be freed with talloc_free()
struct input_ctx;
struct MPOpts;