2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 15:05:56 +00:00

First attempt of Ctrl+Tab/Ctrl+Shift+Tab UI.

This commit is contained in:
John Preston
2025-05-02 17:34:10 +04:00
parent a3cdae1e94
commit 0d8065fc1f
11 changed files with 498 additions and 11 deletions

View File

@@ -656,8 +656,20 @@ bool Application::eventFilter(QObject *object, QEvent *e) {
updateNonIdle();
} break;
case QEvent::KeyRelease: {
const auto event = static_cast<QKeyEvent*>(e);
if (Shortcuts::HandlePossibleChatSwitch(event)) {
return true;
}
} break;
case QEvent::ShortcutOverride: {
// handle shortcuts ourselves
// Ctrl+Tab/Ctrl+Shift+Tab chat switch is a special shortcut case,
// because it not only does an action on the shortcut activation,
// but also keeps the UI visible until you release the Ctrl key.
Shortcuts::HandlePossibleChatSwitch(static_cast<QKeyEvent*>(e));
// Handle all the shortcut management manually.
return true;
} break;