fix cmd+backspace behavior in main chat dialog input (#6111)
This commit is contained in:
committed by
GitHub
parent
d8ef52a308
commit
5901b69898
@@ -6,6 +6,7 @@
|
||||
- Bugfix: Don't create native messaging manifest file if browser directory doesn't exist. (#6116)
|
||||
- Bugfix: Make reply-cancel button less coarse-grained. (#6106)
|
||||
- Bugfix: Fixed missing BetterTTV live updates of emotes. (#6132)
|
||||
- Bugfix: Handle <kbd>CMD</kbd> + <kbd>BACKSPACE</kbd> behavior explicitly in main chat dialog input for macOS. (#6111)
|
||||
- Dev: Conan will no longer generate a `CMakeUserPresets.json` file. (#6117)
|
||||
- Dev: Pass `--force-openssl` when installing from CMake in Qt 6.8+. (#6129)
|
||||
|
||||
|
||||
@@ -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