Skip to content

Commit

Permalink
cocoa: fix charcode retrieving for accented characters
Browse files Browse the repository at this point in the history
The handler was retrieving an invalid charcode for
accented characters, thus ignoring them.
  • Loading branch information
sCreami authored and wm4 committed Feb 15, 2016
1 parent 39ab426 commit 733e0b2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion osdep/macosx_events.m
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,8 @@ - (NSEvent*)handleKey:(NSEvent *)event
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]];
Expand Down

0 comments on commit 733e0b2

Please sign in to comment.