Handle some Mac-standard keyboard shortcuts in Scintilla.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14973
This commit is contained in:
Jeff Young 2023-06-16 17:18:42 +01:00
parent d3be62f644
commit b3235ce667
1 changed files with 22 additions and 0 deletions

View File

@ -317,6 +317,28 @@ void SCINTILLA_TRICKS::onCharHook( wxKeyEvent& aEvent )
{ {
m_te->LineEndWrap(); m_te->LineEndWrap();
} }
else if( ( aEvent.GetModifiers() & wxMOD_RAW_CONTROL ) && aEvent.GetKeyCode() == 'B' )
{
if( aEvent.GetModifiers() & wxMOD_ALT )
m_te->WordLeft();
else
m_te->CharLeft();
}
else if( ( aEvent.GetModifiers() & wxMOD_RAW_CONTROL ) && aEvent.GetKeyCode() == 'F' )
{
if( aEvent.GetModifiers() & wxMOD_ALT )
m_te->WordRight();
else
m_te->CharRight();
}
else if( aEvent.GetModifiers() == wxMOD_RAW_CONTROL && aEvent.GetKeyCode() == 'D' )
{
if( m_te->GetSelectionEnd() == m_te->GetSelectionStart() )
m_te->CharRightExtend();
if( m_te->GetSelectionEnd() > m_te->GetSelectionStart() )
m_te->DeleteBack();
}
#endif #endif
else if( aEvent.GetKeyCode() == WXK_SPECIAL20 ) else if( aEvent.GetKeyCode() == WXK_SPECIAL20 )
{ {