Disable key events for InputPanel's text controls (#520)

This commit is contained in:
SSimco 2022-11-24 10:10:37 +00:00 committed by GitHub
parent c0ebbef9bd
commit c43fc81f8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)