mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 09:47:35 +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
1 changed files with 1 additions and 3 deletions
|
@ -62,6 +62,7 @@ private:
|
||||||
case KeyCode::Key_Right:
|
case KeyCode::Key_Right:
|
||||||
case KeyCode::Key_Up:
|
case KeyCode::Key_Up:
|
||||||
case KeyCode::Key_Down:
|
case KeyCode::Key_Down:
|
||||||
|
case KeyCode::Key_Return:
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
|
@ -106,9 +107,6 @@ private:
|
||||||
virtual RefPtr<Widget> create_widget() override
|
virtual RefPtr<Widget> create_widget() override
|
||||||
{
|
{
|
||||||
auto textbox = CellEditor::construct();
|
auto textbox = CellEditor::construct();
|
||||||
textbox->on_return_pressed = [this] {
|
|
||||||
commit();
|
|
||||||
};
|
|
||||||
textbox->on_escape_pressed = [this] {
|
textbox->on_escape_pressed = [this] {
|
||||||
rollback();
|
rollback();
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue