mirror of
https://github.com/mpv-player/mpv
synced 2024-12-22 23:02:37 +00:00
cocoa: fix charcode retrieving for accented characters
The handler was retrieving an invalid charcode for accented characters, thus ignoring them.
This commit is contained in:
parent
39ab426f05
commit
733e0b23c8
@ -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]];
|
||||
|
Loading…
Reference in New Issue
Block a user