Skip to content

Commit bcb6183

Browse files
committed
Allow home/end to jump to first/last character
1 parent dd47298 commit bcb6183

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/gui/symbology/characterwidget.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,24 @@ void CharacterWidget::keyPressEvent( QKeyEvent *event )
179179
}
180180
setCharacter( QChar( next ) );
181181
}
182+
else if ( event->key() == Qt::Key_Home )
183+
{
184+
int next = 0;
185+
while ( next < 0xfffc && !fm.inFont( QChar( next ) ) )
186+
{
187+
next++;
188+
}
189+
setCharacter( QChar( next ) );
190+
}
191+
else if ( event->key() == Qt::Key_End )
192+
{
193+
int next = 0xfffc;
194+
while ( next > 0 && !fm.inFont( QChar( next ) ) )
195+
{
196+
next--;
197+
}
198+
setCharacter( QChar( next ) );
199+
}
182200
else if ( !event->text().isEmpty() )
183201
{
184202
QChar chr = event->text().at( 0 );

0 commit comments

Comments
 (0)