From b4e3ecf40ee5fda0ba46f714bd24a6d9f3a4cb5e Mon Sep 17 00:00:00 2001 From: Tobias Markmann Date: Thu, 9 Apr 2015 22:18:38 +0200 Subject: Change trellis tab movement shortcuts The previous shortcuts conflicted with the shortcuts for moving to the begin and end of a line in text input widgets. New Shortcuts: Move tab left Ctrl+Shift+Page Up Move tab right Ctrl+Shift+Page Down Move tab to previous group Ctrl+Alt+Page Up Move tab to next group Ctrl+Alt+Page Down Test-Information: Tested and it works on Mac OS X 10.9.5 with Qt 5.4.1. Change-Id: Ie8b6fb05d56013d499e46838b15840554bbe6f72 diff --git a/Swift/QtUI/QtChatTabs.cpp b/Swift/QtUI/QtChatTabs.cpp index 5aca804..9ecf093 100644 --- a/Swift/QtUI/QtChatTabs.cpp +++ b/Swift/QtUI/QtChatTabs.cpp @@ -112,31 +112,31 @@ void QtChatTabs::setViewMenu(QMenu* viewMenu) { viewMenu->addSeparator(); QAction* action = new QAction(tr("Change &layout"), this); action->setShortcutContext(Qt::ApplicationShortcut); - action->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_L)); + action->setShortcut(QKeySequence(tr("Ctrl+Alt+L"))); connect(action, SIGNAL(triggered()), this, SLOT(handleOpenLayoutChangeDialog())); viewMenu->addAction(action); action = new QAction(tr("Move Tab right"), this); action->setShortcutContext(Qt::ApplicationShortcut); - action->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Right)); + action->setShortcut(QKeySequence(tr("Ctrl+Shift+PgDown"))); connect(action, SIGNAL(triggered()), dynamicGrid_, SLOT(moveCurrentTabRight())); viewMenu->addAction(action); action = new QAction(tr("Move Tab left"), this); action->setShortcutContext(Qt::ApplicationShortcut); - action->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Left)); + action->setShortcut(QKeySequence(tr("Ctrl+Shift+PgUp"))); connect(action, SIGNAL(triggered()), dynamicGrid_, SLOT(moveCurrentTabLeft())); viewMenu->addAction(action); action = new QAction(tr("Move Tab to next group"), this); action->setShortcutContext(Qt::ApplicationShortcut); - action->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_Right)); + action->setShortcut(QKeySequence(tr("Ctrl+Alt+PgDown"))); connect(action, SIGNAL(triggered()), dynamicGrid_, SLOT(moveCurrentTabToNextGroup())); viewMenu->addAction(action); action = new QAction(tr("Move Tab to previous group"), this); action->setShortcutContext(Qt::ApplicationShortcut); - action->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_Left)); + action->setShortcut(QKeySequence(tr("Ctrl+Alt+PgUp"))); connect(action, SIGNAL(triggered()), dynamicGrid_, SLOT(moveCurrentTabToPreviousGroup())); viewMenu->addAction(action); } diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp index 88df2e9..0b9b1af 100644 --- a/Swift/QtUI/QtChatWindow.cpp +++ b/Swift/QtUI/QtChatWindow.cpp @@ -279,7 +279,7 @@ void QtChatWindow::handleKeyPressEvent(QKeyEvent* event) { cancelCorrection(); } else if (key == Qt::Key_Down || key == Qt::Key_Up) { - /* Drop */ + event->ignore(); } else { messageLog_->handleKeyPressEvent(event); -- cgit v0.10.2-6-g49f6