mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-07 16:40:59 +00:00
LibGUI: Let's make F2 the standard "edit key"
This matches what other systems do, and allows Return to become the unambiguous "activation key" instead. :^)
This commit is contained in:
parent
12dfeb9845
commit
1847219cbf
|
@ -165,11 +165,17 @@ void TableView::keydown_event(KeyEvent& event)
|
||||||
{
|
{
|
||||||
if (!model())
|
if (!model())
|
||||||
return;
|
return;
|
||||||
if (event.key() == KeyCode::Key_Return) {
|
|
||||||
if (is_editable() && edit_triggers() & EditTrigger::EditKeyPressed)
|
if (event.key() == KeyCode::Key_F2) {
|
||||||
|
if (is_editable() && edit_triggers() & EditTrigger::EditKeyPressed) {
|
||||||
begin_editing(cursor_index());
|
begin_editing(cursor_index());
|
||||||
else
|
event.accept();
|
||||||
activate(cursor_index());
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (event.key() == KeyCode::Key_Return) {
|
||||||
|
activate(cursor_index());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue