diff options
author | Jan Hrastnik | 2020-10-05 15:58:16 +0000 |
---|---|---|
committer | Jan Hrastnik | 2020-10-05 15:58:16 +0000 |
commit | 88f93399fd4a451f529693269e4154421c8a6d06 (patch) | |
tree | 202677a8df207f8cfc7b99919da399963e8f3aed /helix-view/src/keymap.rs | |
parent | 1035b2aea170b68c7f0ed62fa0414e0ed48d5792 (diff) |
fixed page up/down
Diffstat (limited to 'helix-view/src/keymap.rs')
-rw-r--r-- | helix-view/src/keymap.rs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/helix-view/src/keymap.rs b/helix-view/src/keymap.rs index 27176423..72fc0e79 100644 --- a/helix-view/src/keymap.rs +++ b/helix-view/src/keymap.rs @@ -108,6 +108,15 @@ macro_rules! shift { }; } +macro_rules! ctrl { + ($ch:expr) => { + Key { + code: KeyCode::Char($ch), + modifiers: Modifiers::CONTROL, + } + }; +} + pub fn default() -> Keymaps { hashmap!( state::Mode::Normal => @@ -148,8 +157,8 @@ pub fn default() -> Keymaps { code: KeyCode::PageDown, modifiers: Modifiers::NONE }] => commands::page_down, - vec![shift!('u')] => commands::half_page_up, - vec![shift!('d')] => commands::half_page_down, + vec![ctrl!('u')] => commands::half_page_up, + vec![ctrl!('d')] => commands::half_page_down, ), state::Mode::Insert => hashmap!( vec![Key { |