Don't process hotkeys on text entries
Thanks @jeffyoung for the suggestion Fixes https://gitlab.com/kicad/code/kicad/-/issues/4463 Fixes https://gitlab.com/kicad/code/kicad/-/issues/1941
This commit is contained in:
parent
112316cdfb
commit
fbef52ec33
|
@ -196,6 +196,10 @@ void EDA_DRAW_FRAME::unitsChangeRefresh()
|
|||
|
||||
bool EDA_DRAW_FRAME::DispatchBehindModalDialog( wxKeyEvent& aEvent )
|
||||
{
|
||||
// Never process hotkeys when a text entry field is focused
|
||||
if( dynamic_cast<wxTextEntry*>( FindFocus() ) )
|
||||
return false;
|
||||
|
||||
static std::set<const TOOL_ACTION*> whiteList = { &ACTIONS::toggleUnits,
|
||||
&ACTIONS::imperialUnits,
|
||||
&ACTIONS::metricUnits };
|
||||
|
|
|
@ -483,7 +483,10 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent )
|
|||
wxKeyEvent* ke = static_cast<wxKeyEvent*>( &aEvent );
|
||||
|
||||
keyIsEscape = ( ke->GetKeyCode() == WXK_ESCAPE );
|
||||
evt = GetToolEvent( ke, &keyIsSpecial );
|
||||
|
||||
// Never process key events for tools when a text entry has focus
|
||||
if( !dynamic_cast<wxTextEntry*>( wxWindow::FindFocus() ) )
|
||||
evt = GetToolEvent( ke, &keyIsSpecial );
|
||||
}
|
||||
else if( type == wxEVT_MENU_OPEN || type == wxEVT_MENU_CLOSE || type == wxEVT_MENU_HIGHLIGHT )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue