From 64e448eef067862e90ff5763a47d6fcebd4ec213 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 28 Aug 2020 21:29:59 +0200 Subject: [PATCH] Spreadsheet: Treat Return as a cursor key in the cell editing delegate This allows you to enter many rows of cells like so: 123... Very cool! :^) --- Applications/Spreadsheet/SpreadsheetView.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Applications/Spreadsheet/SpreadsheetView.h b/Applications/Spreadsheet/SpreadsheetView.h index 8d1e341b23..608493a4dd 100644 --- a/Applications/Spreadsheet/SpreadsheetView.h +++ b/Applications/Spreadsheet/SpreadsheetView.h @@ -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 create_widget() override { auto textbox = CellEditor::construct(); - textbox->on_return_pressed = [this] { - commit(); - }; textbox->on_escape_pressed = [this] { rollback(); };