mirror of
https://github.com/rust-windowing/winit.git
synced 2026-09-01 06:10:07 -04:00
Merge pull request #722 from paulrouget/azerty
allow non ascii character in ReceivedCharacter
This commit is contained in:
@@ -837,9 +837,7 @@ unsafe fn NSEventToEvent(window: &Window, nsevent: id) -> Option<Event> {
|
|||||||
let received_c_str = nsevent.characters().UTF8String();
|
let received_c_str = nsevent.characters().UTF8String();
|
||||||
let received_str = CStr::from_ptr(received_c_str);
|
let received_str = CStr::from_ptr(received_c_str);
|
||||||
for received_char in from_utf8(received_str.to_bytes()).unwrap().chars() {
|
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));
|
let vkey = event::vkeycode_to_element(NSEvent::keyCode(nsevent));
|
||||||
|
|||||||
Reference in New Issue
Block a user