Skip to content

Commit

Permalink
Change Scroll Up and Scroll Down keybindings
Browse files Browse the repository at this point in the history
For scroll up:

- Before: ctrl-y
- After: ctrl-up

For scroll down:
- Before: ctrl-e
- After: ctrl-down
  • Loading branch information
emesterhazy committed Jun 2, 2024
1 parent 35b80bb commit 0564cce
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ impl From<crossterm::event::Event> for Event {
}) => Self::QuitAccept,

Event::Key(KeyEvent {
code: KeyCode::Char('y'),
code: KeyCode::Up | KeyCode::Char('y'),
modifiers: KeyModifiers::CONTROL,
kind: KeyEventKind::Press,
state: _,
Expand All @@ -177,7 +177,7 @@ impl From<crossterm::event::Event> for Event {
modifiers: _,
}) => Self::ScrollUp,
Event::Key(KeyEvent {
code: KeyCode::Char('e'),
code: KeyCode::Down | KeyCode::Char('e'),
modifiers: KeyModifiers::CONTROL,
kind: KeyEventKind::Press,
state: _,
Expand Down Expand Up @@ -752,11 +752,11 @@ impl<'state, 'input> Recorder<'state, 'input> {
event: Event::ExpandAll,
},
MenuItem {
label: Cow::Borrowed("Scroll up (ctrl-y)"),
label: Cow::Borrowed("Scroll up (ctrl-up, ctrl-y)"),
event: Event::ScrollUp,
},
MenuItem {
label: Cow::Borrowed("Scroll down (ctrl-e)"),
label: Cow::Borrowed("Scroll down (ctrl-down, ctrl-e)"),
event: Event::ScrollDown,
},
MenuItem {
Expand Down

0 comments on commit 0564cce

Please sign in to comment.