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]];