mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 07:03:15 -04:00
Support ReceivedCharacter event
This commit is contained in:
@@ -80,6 +80,14 @@ impl<T> WindowTarget<T> {
|
||||
});
|
||||
});
|
||||
|
||||
let runner = self.runner.clone();
|
||||
canvas.on_key_press(move |char_code| {
|
||||
runner.send_event(Event::WindowEvent {
|
||||
window_id: WindowId(window::Id),
|
||||
event: WindowEvent::ReceivedCharacter(char_code),
|
||||
});
|
||||
});
|
||||
|
||||
let runner = self.runner.clone();
|
||||
canvas.on_mouse_out(move |pointer_id| {
|
||||
runner.send_event(Event::WindowEvent {
|
||||
|
||||
Reference in New Issue
Block a user