Support ReceivedCharacter event
This commit is contained in:
parent
8ad078b964
commit
8f66d96915
3 changed files with 23 additions and 8 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue