mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 23:23:14 -04:00
Support ReceivedCharacter event
This commit is contained in:
@@ -218,3 +218,7 @@ pub fn keyboard_modifiers(event: &KeyboardEvent) -> ModifiersState {
|
||||
logo: event.meta_key(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn codepoint(event: &KeyboardEvent) -> char {
|
||||
event.key().chars().next().unwrap()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user