Skip to content
Permalink
Browse files

Allow home/end to jump to first/last character

  • Loading branch information
nyalldawson committed May 2, 2019
1 parent dd47298 commit bcb6183db092aaa8d309b76904b105a36edf432c
Showing with 18 additions and 0 deletions.
  1. +18 −0 src/gui/symbology/characterwidget.cpp
@@ -179,6 +179,24 @@ void CharacterWidget::keyPressEvent( QKeyEvent *event )
}
setCharacter( QChar( next ) );
}
else if ( event->key() == Qt::Key_Home )
{
int next = 0;
while ( next < 0xfffc && !fm.inFont( QChar( next ) ) )
{
next++;
}
setCharacter( QChar( next ) );
}
else if ( event->key() == Qt::Key_End )
{
int next = 0xfffc;
while ( next > 0 && !fm.inFont( QChar( next ) ) )
{
next--;
}
setCharacter( QChar( next ) );
}
else if ( !event->text().isEmpty() )
{
QChar chr = event->text().at( 0 );

0 comments on commit bcb6183

Please sign in to comment.
You can’t perform that action at this time.