fix cmd+backspace behavior in main chat dialog input (#6111)
This commit is contained in:
committed by
GitHub
parent
d8ef52a308
commit
5901b69898
@@ -131,6 +131,18 @@ bool ResizingTextEdit::eventFilter(QObject *obj, QEvent *event)
|
||||
}
|
||||
void ResizingTextEdit::keyPressEvent(QKeyEvent *event)
|
||||
{
|
||||
#ifdef Q_OS_MACOS
|
||||
if ((event->modifiers() == Qt::ControlModifier) &&
|
||||
(event->key() == Qt::Key_Backspace))
|
||||
{
|
||||
QTextCursor cursor = this->textCursor();
|
||||
cursor.movePosition(QTextCursor::StartOfLine, QTextCursor::KeepAnchor);
|
||||
cursor.removeSelectedText();
|
||||
this->setTextCursor(cursor);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
event->ignore();
|
||||
|
||||
this->keyPressed.invoke(event);
|
||||
|
||||
Reference in New Issue
Block a user