From c43fc81f8e8b4ad87d3dd0eaf8c19202f6c38961 Mon Sep 17 00:00:00 2001 From: SSimco <37044560+SSimco@users.noreply.github.com> Date: Thu, 24 Nov 2022 10:10:37 +0000 Subject: [PATCH] Disable key events for InputPanel's text controls (#520) --- src/gui/input/panels/InputPanel.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/input/panels/InputPanel.cpp b/src/gui/input/panels/InputPanel.cpp index 984b46d7..3ea039bc 100644 --- a/src/gui/input/panels/InputPanel.cpp +++ b/src/gui/input/panels/InputPanel.cpp @@ -212,6 +212,10 @@ void InputPanel::bind_hotkey_events(wxTextCtrl* text_ctrl) text_ctrl->Bind(wxEVT_SET_FOCUS, &InputPanel::on_edit_key_focus, this); text_ctrl->Bind(wxEVT_KILL_FOCUS, &InputPanel::on_edit_key_kill_focus, this); text_ctrl->Bind(wxEVT_RIGHT_DOWN, &InputPanel::on_right_click, this); +#if BOOST_OS_LINUX + // Bind to a no-op lambda to disable arrow keys navigation + text_ctrl->Bind(wxEVT_KEY_DOWN, [](wxKeyEvent &) {}); +#endif } void InputPanel::on_left_click(wxMouseEvent& event)