Skip to content

Commit

Permalink
Allow home/end to jump to first/last character
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed May 2, 2019
1 parent dd47298 commit bcb6183
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/gui/symbology/characterwidget.cpp
Expand Up @@ -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 );
Expand Down

0 comments on commit bcb6183

Please sign in to comment.