diff --git a/examples/bezier_tool/src/main.rs b/examples/bezier_tool/src/main.rs index fe41e1b2..fb740b83 100644 --- a/examples/bezier_tool/src/main.rs +++ b/examples/bezier_tool/src/main.rs @@ -143,6 +143,7 @@ mod bezier { } _ => None, }, + _ => None, } } diff --git a/examples/game_of_life/src/main.rs b/examples/game_of_life/src/main.rs index c934467d..2addd950 100644 --- a/examples/game_of_life/src/main.rs +++ b/examples/game_of_life/src/main.rs @@ -413,6 +413,7 @@ mod grid { }, _ => None, }, + _ => None, } } diff --git a/graphics/src/widget/canvas.rs b/graphics/src/widget/canvas.rs index b8466239..bc0802e5 100644 --- a/graphics/src/widget/canvas.rs +++ b/graphics/src/widget/canvas.rs @@ -173,6 +173,9 @@ where iced_native::Event::Mouse(mouse_event) => { Some(Event::Mouse(mouse_event)) } + iced_native::Event::Keyboard(keyboard_event) => { + Some(Event::Keyboard(keyboard_event)) + } _ => None, }; diff --git a/graphics/src/widget/canvas/event.rs b/graphics/src/widget/canvas/event.rs index ad11f51e..0e66f0ff 100644 --- a/graphics/src/widget/canvas/event.rs +++ b/graphics/src/widget/canvas/event.rs @@ -1,3 +1,4 @@ +use iced_native::keyboard; use iced_native::mouse; /// A [`Canvas`] event. @@ -7,4 +8,7 @@ use iced_native::mouse; pub enum Event { /// A mouse event. Mouse(mouse::Event), + + /// A keyboard event. + Keyboard(keyboard::Event), }