Handle some Mac-standard keyboard shortcuts in Scintilla.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14973

(cherry picked from commit b3235ce667)
This commit is contained in:
Jeff Young 2023-06-16 17:18:42 +01:00
parent 76f8b3df22
commit 19e128041b
1 changed files with 22 additions and 0 deletions

View File

@ -303,6 +303,28 @@ void SCINTILLA_TRICKS::onCharHook( wxKeyEvent& aEvent )
{
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
else if( aEvent.GetKeyCode() == WXK_SPECIAL20 )
{