mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:58:11 +00:00
LibGUI: Move keyboard item activation up to AbstractView
All views want the same behavior, so move this to the base class. :^)
This commit is contained in:
parent
d8553a6406
commit
d3adbed231
8 changed files with 9 additions and 40 deletions
|
@ -198,11 +198,6 @@ void ListView::keydown_event(KeyEvent& event)
|
|||
if (!model())
|
||||
return;
|
||||
|
||||
ModelIndex new_index;
|
||||
if (event.key() == KeyCode::Key_Return) {
|
||||
activate_selected();
|
||||
return;
|
||||
}
|
||||
if (event.key() == KeyCode::Key_Escape) {
|
||||
if (on_escape_pressed)
|
||||
on_escape_pressed();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue