Override Home and End behaviour.
Home now brings you to the beginning of the message (previously of the line) End now brings you to the end of the message (previously of the line)
This commit is contained in:
@@ -250,6 +250,22 @@ void SplitInput::installKeyPressedEvent()
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (event->key() == Qt::Key_Home)
|
||||
{
|
||||
QTextCursor cursor = this->ui_.textEdit->textCursor();
|
||||
cursor.movePosition(QTextCursor::Start);
|
||||
this->ui_.textEdit->setTextCursor(cursor);
|
||||
|
||||
event->accept();
|
||||
}
|
||||
else if (event->key() == Qt::Key_End)
|
||||
{
|
||||
QTextCursor cursor = this->ui_.textEdit->textCursor();
|
||||
cursor.movePosition(QTextCursor::End);
|
||||
this->ui_.textEdit->setTextCursor(cursor);
|
||||
|
||||
event->accept();
|
||||
}
|
||||
else if (event->key() == Qt::Key_H &&
|
||||
event->modifiers() == Qt::AltModifier)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user