More refactoring of some code to make it cleaner.
This commit is contained in:
parent
59c0b3df62
commit
0c48c5973f
20
src/main.rs
20
src/main.rs
|
@ -342,18 +342,14 @@ fn handle_key_event_or_break(
|
||||||
}
|
}
|
||||||
} else if let KeyModifiers::SHIFT = event.modifiers {
|
} else if let KeyModifiers::SHIFT = event.modifiers {
|
||||||
match event.code {
|
match event.code {
|
||||||
KeyCode::Left | KeyCode::Char('h') | KeyCode::Char('H') => {
|
KeyCode::Left => app.move_widget_selection_left(),
|
||||||
app.move_widget_selection_left()
|
KeyCode::Char('h') | KeyCode::Char('H') => app.on_char_key('H'),
|
||||||
}
|
KeyCode::Right => app.move_widget_selection_right(),
|
||||||
KeyCode::Right | KeyCode::Char('l') | KeyCode::Char('L') => {
|
KeyCode::Char('l') | KeyCode::Char('L') => app.on_char_key('L'),
|
||||||
app.move_widget_selection_right()
|
KeyCode::Up => app.move_widget_selection_up(),
|
||||||
}
|
KeyCode::Char('k') | KeyCode::Char('K') => app.on_char_key('K'),
|
||||||
KeyCode::Up | KeyCode::Char('k') | KeyCode::Char('K') => {
|
KeyCode::Down => app.move_widget_selection_down(),
|
||||||
app.move_widget_selection_up()
|
KeyCode::Char('j') | KeyCode::Char('J') => app.on_char_key('J'),
|
||||||
}
|
|
||||||
KeyCode::Down | KeyCode::Char('j') | KeyCode::Char('J') => {
|
|
||||||
app.move_widget_selection_down()
|
|
||||||
}
|
|
||||||
KeyCode::Char('/') | KeyCode::Char('?') => app.on_char_key('?'),
|
KeyCode::Char('/') | KeyCode::Char('?') => app.on_char_key('?'),
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue