Commit d7caae5f authored by Christian Stenger's avatar Christian Stenger
Browse files

Core: Change shortcut for maximizing outputpane...

...and limit the shortcuts for the outputpanes.

An output pane gets it shortcut by the ordering number it's added
to Qt Creator. Depending on the number of enabled plugins we now
have more output panes than available digits.
Alt+9 (or Cmd+9 on OSX) had been used already for maximizing the
outputpane, so changing this shortcut and ensure to use only the
available digits for the outputpanes.

Task-number: QTCREATORBUG-15356
Change-Id: I41a9e3df11a1abde3ec4c5d4a13e932bec024154
Reviewed-by: default avatarEike Ziller <>
parent 5c0b2d1b
......@@ -189,11 +189,14 @@ QWidget *OutputPaneManager::buttonsWidget()
return m_buttonsWidget;
// Return shortcut as Ctrl+<number>
static inline int paneShortCut(int number)
// Return shortcut as Alt+<number> or Cmd+<number> if number is a non-zero digit
static inline QKeySequence paneShortCut(int number)
if (number < 1 || number > 9)
return QKeySequence();
const int modifier = HostOsInfo::isMacHost() ? Qt::CTRL : Qt::ALT;
return modifier | (Qt::Key_0 + number);
return QKeySequence(modifier | (Qt::Key_0 + number));
void OutputPaneManager::init()
......@@ -224,7 +227,7 @@ void OutputPaneManager::init()
mpanes->addAction(cmd, "Coreplugin.OutputPane.ActionsGroup");
cmd = ActionManager::registerAction(m_minMaxAction, "Coreplugin.OutputPane.minmax");
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Ctrl+9") : tr("Alt+9")));
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Ctrl+Shift+9") : tr("Alt+Shift+9")));
mpanes->addAction(cmd, "Coreplugin.OutputPane.ActionsGroup");
......@@ -282,7 +285,7 @@ void OutputPaneManager::init()
OutputPaneToggleButton *button = new OutputPaneToggleButton(shortcutNumber, outPane->displayName(),
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment