diff --git a/src/native/macosx/OSXWindow.m b/src/native/macosx/OSXWindow.m index bfa6447..bab4a9f 100644 --- a/src/native/macosx/OSXWindow.m +++ b/src/native/macosx/OSXWindow.m @@ -70,6 +70,14 @@ key_callback(rust_data, [event keyCode], 1); } + if (char_callback) { + NSString* characters = [event characters]; + NSUInteger i, length = [characters length]; + + for (i = 0; i < length; i++) + char_callback(rust_data, [characters characterAtIndex:i]); + } + [super keyDown:event]; }