diff options
author | 2020-03-17 07:16:54 +0100 | |
---|---|---|
committer | 2020-03-17 07:16:54 +0100 | |
commit | 1cd1582506810255394d2f9019597e9252bd8daa (patch) | |
tree | 8be830e2093a96bf3c538777108256be56499afa /examples/pane_grid | |
parent | 6f9cf6c70d8ef01446dae4d093c6e8ff2c7e7708 (diff) | |
download | iced-1cd1582506810255394d2f9019597e9252bd8daa.tar.gz iced-1cd1582506810255394d2f9019597e9252bd8daa.tar.bz2 iced-1cd1582506810255394d2f9019597e9252bd8daa.zip |
Add `modifiers` to `KeyPressEvent` in `pane_grid`
Diffstat (limited to 'examples/pane_grid')
-rw-r--r-- | examples/pane_grid/src/main.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/pane_grid/src/main.rs b/examples/pane_grid/src/main.rs index 7ab68393..461ffc30 100644 --- a/examples/pane_grid/src/main.rs +++ b/examples/pane_grid/src/main.rs @@ -115,11 +115,11 @@ impl Sandbox for Example { } } -fn handle_hotkey(key_code: keyboard::KeyCode) -> Option<Message> { +fn handle_hotkey(event: pane_grid::KeyPressEvent) -> Option<Message> { use keyboard::KeyCode; use pane_grid::{Axis, Direction}; - let direction = match key_code { + let direction = match event.key_code { KeyCode::Up => Some(Direction::Up), KeyCode::Down => Some(Direction::Down), KeyCode::Left => Some(Direction::Left), @@ -127,7 +127,7 @@ fn handle_hotkey(key_code: keyboard::KeyCode) -> Option<Message> { _ => None, }; - match key_code { + match event.key_code { KeyCode::V => Some(Message::SplitFocused(Axis::Vertical)), KeyCode::H => Some(Message::SplitFocused(Axis::Horizontal)), KeyCode::W => Some(Message::CloseFocused), |