diff options
author | Alexis Nootens <me@axn.io> | 2016-02-13 12:19:45 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-02-15 18:21:50 +0100 |
commit | 733e0b23c8be3aaf078e873f6e9776a5ab792ce9 (patch) | |
tree | b00be9b18f089ad5ef8be994c85624b7cb76b9a3 /osdep | |
parent | 39ab426f05826a924cc89b362c60c4b7172cf922 (diff) | |
download | mpv-733e0b23c8be3aaf078e873f6e9776a5ab792ce9.tar.bz2 mpv-733e0b23c8be3aaf078e873f6e9776a5ab792ce9.tar.xz |
cocoa: fix charcode retrieving for accented characters
The handler was retrieving an invalid charcode for
accented characters, thus ignoring them.
Diffstat (limited to 'osdep')
-rw-r--r-- | osdep/macosx_events.m | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/osdep/macosx_events.m b/osdep/macosx_events.m index 51aaf2aca4..6090a1937e 100644 --- a/osdep/macosx_events.m +++ b/osdep/macosx_events.m @@ -451,7 +451,8 @@ void cocoa_set_input_context(struct input_ctx *input_context) else chars = [event charactersIgnoringModifiers]; - int key = convert_key([event keyCode], *[chars UTF8String]); + struct bstr t = bstr0([chars UTF8String]); + int key = convert_key([event keyCode], bstr_decode_utf8(t, &t)); if (key > -1) [self handleMPKey:key withMask:[self keyModifierMask:event]]; |