summaryrefslogtreecommitdiff
path: root/helix-view/src/keyboard.rs
diff options
context:
space:
mode:
authorCharlie Groves2022-08-22 01:29:30 +0000
committerGitHub2022-08-22 01:29:30 +0000
commit18909aafe21ed32f11dcdf646423b43b1a951010 (patch)
tree0aea80a2b5e009a60108b5c87e890b2e9cdbeb10 /helix-view/src/keyboard.rs
parentd993c6349b4fdeca80c270af237b39f40a7f3d9a (diff)
Update to crossterm-0.25 (#3390)
Diffstat (limited to 'helix-view/src/keyboard.rs')
-rw-r--r--helix-view/src/keyboard.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/helix-view/src/keyboard.rs b/helix-view/src/keyboard.rs
index d1b45b05..84cfebf1 100644
--- a/helix-view/src/keyboard.rs
+++ b/helix-view/src/keyboard.rs
@@ -147,6 +147,17 @@ impl From<crossterm::event::KeyCode> for KeyCode {
CKeyCode::Char(character) => KeyCode::Char(character),
CKeyCode::Null => KeyCode::Null,
CKeyCode::Esc => KeyCode::Esc,
+ CKeyCode::CapsLock
+ | CKeyCode::ScrollLock
+ | CKeyCode::NumLock
+ | CKeyCode::PrintScreen
+ | CKeyCode::Pause
+ | CKeyCode::Menu
+ | CKeyCode::KeypadBegin
+ | CKeyCode::Media(_)
+ | CKeyCode::Modifier(_) => unreachable!(
+ "Shouldn't get this key without enabling DISAMBIGUATE_ESCAPE_CODES in crossterm"
+ ),
}
}
}