summaryrefslogtreecommitdiffstats
path: root/osdep/macosx_events.m
diff options
context:
space:
mode:
Diffstat (limited to 'osdep/macosx_events.m')
-rw-r--r--osdep/macosx_events.m3
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]];