1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 13:57:35 +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

@ -166,7 +166,6 @@ public:
Action& cut_action() { return *m_cut_action; }
Action& copy_action() { return *m_copy_action; }
Action& paste_action() { return *m_paste_action; }
Action& delete_action() { return *m_delete_action; }
Action& go_to_line_action() { return *m_go_to_line_action; }
Action& select_all_action() { return *m_select_all_action; }
@ -365,7 +364,6 @@ private:
RefPtr<Action> m_cut_action;
RefPtr<Action> m_copy_action;
RefPtr<Action> m_paste_action;
RefPtr<Action> m_delete_action;
RefPtr<Action> m_go_to_line_action;
RefPtr<Action> m_select_all_action;
Core::ElapsedTimer m_triple_click_timer;