LibGUI: Allow moving the TableView selection horizontally with keyboard

This commit is contained in:
Andreas Kling 2020-08-24 21:02:46 +02:00
parent e5a6e297bf
commit 2cbe290930
Notes: sideshowbarker 2024-07-19 03:12:14 +09:00
3 changed files with 13 additions and 5 deletions

View file

@ -162,12 +162,20 @@ void TableView::keydown_event(KeyEvent& event)
activate_selected();
return;
}
if (event.key() == KeyCode::Key_Left) {
move_selection(0, -1);
return;
}
if (event.key() == KeyCode::Key_Right) {
move_selection(0, 1);
return;
}
if (event.key() == KeyCode::Key_Up) {
move_selection(-1);
move_selection(-1, 0);
return;
}
if (event.key() == KeyCode::Key_Down) {
move_selection(1);
move_selection(1, 0);
return;
}
if (event.key() == KeyCode::Key_PageUp) {