1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-15 04:34:59 +00:00

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
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) {