mirror of
https://github.com/storytold/winit.git
synced 2026-11-29 09:44:58 +01:00
allow non ascii character in ReceivedCharacter
This commit is contained in:
1 parent
3246613a51
commit
202f8c5a2d
1 file changed
+1
-3
@@ -837,9 +837,7 @@ unsafe fn NSEventToEvent(window: &Window, nsevent: id) -> Option<Event> {
|
||||
let received_c_str = nsevent.characters().UTF8String();
|
||||
let received_str = CStr::from_ptr(received_c_str);
|
||||
for received_char in from_utf8(received_str.to_bytes()).unwrap().chars() {
|
||||
if received_char.is_ascii() {
|
||||
events.push_back(ReceivedCharacter(received_char));
|
||||
}
|
||||
events.push_back(ReceivedCharacter(received_char));
|
||||
}
|
||||
|
||||
let vkey = event::vkeycode_to_element(NSEvent::keyCode(nsevent));
|
||||
|
||||
Reference in new issue
Block a user