mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-07 16:40:59 +00:00
Spreadsheet: Treat Return as a cursor key in the cell editing delegate
This allows you to enter many rows of cells like so: 1<return>2<return>3<return>... Very cool! :^)
This commit is contained in:
parent
c3b2495320
commit
64e448eef0
|
@ -62,6 +62,7 @@ private:
|
|||
case KeyCode::Key_Right:
|
||||
case KeyCode::Key_Up:
|
||||
case KeyCode::Key_Down:
|
||||
case KeyCode::Key_Return:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
|
@ -106,9 +107,6 @@ private:
|
|||
virtual RefPtr<Widget> create_widget() override
|
||||
{
|
||||
auto textbox = CellEditor::construct();
|
||||
textbox->on_return_pressed = [this] {
|
||||
commit();
|
||||
};
|
||||
textbox->on_escape_pressed = [this] {
|
||||
rollback();
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue