UI: Add Numpad Enter as "Return" equivalent in missing places
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14244
This commit is contained in:
parent
cb7aa5143b
commit
c3a6bf3d40
|
@ -595,7 +595,8 @@ void DIALOG_SHIM::OnCharHook( wxKeyEvent& aEvt )
|
|||
}
|
||||
}
|
||||
// shift-return (Mac default) or Ctrl-Return (GTK) for OK
|
||||
else if( aEvt.GetKeyCode() == WXK_RETURN && ( aEvt.ShiftDown() || aEvt.ControlDown() ) )
|
||||
else if( ( aEvt.GetKeyCode() == WXK_RETURN || aEvt.GetKeyCode() == WXK_NUMPAD_ENTER )
|
||||
&& ( aEvt.ShiftDown() || aEvt.ControlDown() ) )
|
||||
{
|
||||
wxPostEvent( this, wxCommandEvent( wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK ) );
|
||||
return;
|
||||
|
|
|
@ -162,7 +162,8 @@ void SCINTILLA_TRICKS::onCharHook( wxKeyEvent& aEvent )
|
|||
if( !isalpha( aEvent.GetKeyCode() ) )
|
||||
m_suppressAutocomplete = false;
|
||||
|
||||
if( aEvent.GetKeyCode() == WXK_RETURN && ( m_singleLine || aEvent.ShiftDown() ) )
|
||||
if( ( aEvent.GetKeyCode() == WXK_RETURN || aEvent.GetKeyCode() == WXK_NUMPAD_ENTER )
|
||||
&& ( m_singleLine || aEvent.ShiftDown() ) )
|
||||
{
|
||||
m_returnCallback();
|
||||
}
|
||||
|
|
|
@ -440,6 +440,7 @@ protected:
|
|||
break;
|
||||
|
||||
case WXK_RETURN:
|
||||
case WXK_NUMPAD_ENTER:
|
||||
Accept();
|
||||
break;
|
||||
|
||||
|
@ -582,13 +583,14 @@ void NET_SELECTOR::onKeyDown( wxKeyEvent& aEvt )
|
|||
}
|
||||
|
||||
// Shift-return accepts dialog
|
||||
else if( key == WXK_RETURN && aEvt.ShiftDown() )
|
||||
else if( ( key == WXK_RETURN || key == WXK_NUMPAD_ENTER ) && aEvt.ShiftDown() )
|
||||
{
|
||||
wxPostEvent( m_parent, wxCommandEvent( wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK ) );
|
||||
}
|
||||
|
||||
// Return, arrow-down and space-bar all open popup
|
||||
else if( key == WXK_RETURN || key == WXK_DOWN || key == WXK_NUMPAD_DOWN || key == WXK_SPACE )
|
||||
else if( key == WXK_RETURN || key == WXK_NUMPAD_ENTER || key == WXK_DOWN
|
||||
|| key == WXK_NUMPAD_DOWN || key == WXK_SPACE )
|
||||
{
|
||||
Popup();
|
||||
}
|
||||
|
|
|
@ -382,6 +382,7 @@ void WX_COLLAPSIBLE_PANE_HEADER::onChar( wxKeyEvent& aEvent )
|
|||
{
|
||||
case WXK_SPACE:
|
||||
case WXK_RETURN:
|
||||
case WXK_NUMPAD_ENTER:
|
||||
doSetCollapsed( !m_collapsed );
|
||||
break;
|
||||
|
||||
|
|
|
@ -124,7 +124,7 @@ void DIALOG_SCH_FIND::OnUpdateReplaceAllUI( wxUpdateUIEvent& aEvent )
|
|||
|
||||
void DIALOG_SCH_FIND::OnChar( wxKeyEvent& aEvent )
|
||||
{
|
||||
if( aEvent.GetKeyCode() == WXK_RETURN )
|
||||
if( aEvent.GetKeyCode() == WXK_RETURN || aEvent.GetKeyCode() == WXK_NUMPAD_ENTER )
|
||||
{
|
||||
wxCommandEvent dummyCommand;
|
||||
OnFind( dummyCommand );
|
||||
|
|
|
@ -97,6 +97,10 @@ DIALOG_SIM_MODEL<T_symbol, T_field>::DIALOG_SIM_MODEL( wxWindow* aParent, T_symb
|
|||
grid->DedicateKey( WXK_RETURN );
|
||||
grid->AddActionTrigger( wxPG_ACTION_NEXT_PROPERTY, WXK_RETURN );
|
||||
|
||||
grid->AddActionTrigger( wxPG_ACTION_EDIT, WXK_NUMPAD_ENTER );
|
||||
grid->DedicateKey( WXK_NUMPAD_ENTER );
|
||||
grid->AddActionTrigger( wxPG_ACTION_NEXT_PROPERTY, WXK_NUMPAD_ENTER );
|
||||
|
||||
grid->DedicateKey( WXK_UP );
|
||||
grid->DedicateKey( WXK_DOWN );
|
||||
|
||||
|
|
|
@ -1233,7 +1233,8 @@ void SYMBOL_VIEWER_FRAME::OnCharHook( wxKeyEvent& aEvent )
|
|||
else
|
||||
aEvent.Skip();
|
||||
}
|
||||
else if( aEvent.GetKeyCode() == WXK_RETURN && m_symbolList->GetSelection() >= 0 )
|
||||
else if( ( aEvent.GetKeyCode() == WXK_RETURN || aEvent.GetKeyCode() == WXK_NUMPAD_ENTER )
|
||||
&& m_symbolList->GetSelection() >= 0 )
|
||||
{
|
||||
wxCommandEvent dummy;
|
||||
DClickOnSymbolList( dummy );
|
||||
|
|
|
@ -665,7 +665,8 @@ void FOOTPRINT_VIEWER_FRAME::OnCharHook( wxKeyEvent& aEvent )
|
|||
else
|
||||
aEvent.Skip();
|
||||
}
|
||||
else if( aEvent.GetKeyCode() == WXK_RETURN && m_fpList->GetSelection() >= 0 )
|
||||
else if( ( aEvent.GetKeyCode() == WXK_RETURN || aEvent.GetKeyCode() == WXK_NUMPAD_ENTER )
|
||||
&& m_fpList->GetSelection() >= 0 )
|
||||
{
|
||||
wxCommandEvent dummy;
|
||||
AddFootprintToPCB( dummy );
|
||||
|
|
Loading…
Reference in New Issue