summaryrefslogtreecommitdiff
path: root/helix-term/src/keymap.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-11-12 07:21:03 +0000
committerBlaž Hrastnik2021-11-12 07:21:03 +0000
commitd3def16584f7f35a64ab2bad578436bd13cc18b6 (patch)
tree979330a77ffc5ba28b5627dc6d74d7402c7b4f67 /helix-term/src/keymap.rs
parentfa0cb010e16c6a7d95b8849f073f472b0bd710be (diff)
fix: shift-tab mappings broken after efc2b4c7
Diffstat (limited to 'helix-term/src/keymap.rs')
-rw-r--r--helix-term/src/keymap.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/helix-term/src/keymap.rs b/helix-term/src/keymap.rs
index 1a9ea231..e3e01995 100644
--- a/helix-term/src/keymap.rs
+++ b/helix-term/src/keymap.rs
@@ -26,6 +26,22 @@ macro_rules! key {
}
#[macro_export]
+macro_rules! shift {
+ ($key:ident) => {
+ ::helix_view::input::KeyEvent {
+ code: ::helix_view::keyboard::KeyCode::$key,
+ modifiers: ::helix_view::keyboard::KeyModifiers::SHIFT,
+ }
+ };
+ ($($ch:tt)*) => {
+ ::helix_view::input::KeyEvent {
+ code: ::helix_view::keyboard::KeyCode::Char($($ch)*),
+ modifiers: ::helix_view::keyboard::KeyModifiers::SHIFT,
+ }
+ };
+}
+
+#[macro_export]
macro_rules! ctrl {
($key:ident) => {
::helix_view::input::KeyEvent {