1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:58:11 +00:00

LibGUI: Change delete key handling from action to keydown_event

Having the delete key handling be done via an action limits our ability
to support key modifiers (e.g. ctrl+delete deleting the word in front of
the cursor).

The fact that it was an action _did_ allow us to have a delete button in
the TextEditor UI. However, this is an odd choice in the first place
that isn't common in other text editors, so I just removed it.
This commit is contained in:
Andrew January 2021-08-20 18:56:43 +01:00 committed by Andreas Kling
parent a701ed52fc
commit 22e80bae29
3 changed files with 20 additions and 8 deletions

View file

@ -327,7 +327,6 @@ MainWidget::MainWidget()
m_toolbar->add_action(m_editor->cut_action());
m_toolbar->add_action(m_editor->copy_action());
m_toolbar->add_action(m_editor->paste_action());
m_toolbar->add_action(m_editor->delete_action());
m_toolbar->add_separator();
@ -384,7 +383,6 @@ void MainWidget::initialize_menubar(GUI::Window& window)
edit_menu.add_action(m_editor->cut_action());
edit_menu.add_action(m_editor->copy_action());
edit_menu.add_action(m_editor->paste_action());
edit_menu.add_action(m_editor->delete_action());
edit_menu.add_separator();
edit_menu.add_action(*m_vim_emulation_setting_action);
edit_menu.add_separator();