diff options
Diffstat (limited to 'helix-term/src/keymap.rs')
-rw-r--r-- | helix-term/src/keymap.rs | 16 |
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 { |