fix cmd+backspace behavior in main chat dialog input (#6111)

This commit is contained in:
Jacob Alexander Thompson
2025-04-06 04:20:07 -07:00
committed by GitHub
parent d8ef52a308
commit 5901b69898
2 changed files with 13 additions and 0 deletions
+12
View File
@@ -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);