forked from qt-creator/qt-creator
Macros: Disambiguate short cut
On an English keyboard Alt+( and Alt+) are basically the same as Alt+Shift+9 and Alt+Shift+0. On Windows and Linux these are already assigned to (more prominent) actions, so re-assign macro recording related short cuts. Change-Id: I1057a08a617adf8027e28936feeb6347fbeb2c4e Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -74,14 +74,14 @@ bool MacrosPlugin::initialize(const QStringList &arguments, QString *errorMessag
|
||||
|
||||
QAction *startMacro = new QAction(tr("Record Macro"), this);
|
||||
Core::Command *command = Core::ActionManager::registerAction(startMacro, Constants::START_MACRO, textContext);
|
||||
command->setDefaultKeySequence(QKeySequence(Core::useMacShortcuts ? tr("Ctrl+(") : tr("Alt+(")));
|
||||
command->setDefaultKeySequence(QKeySequence(Core::useMacShortcuts ? tr("Ctrl+[") : tr("Alt+[")));
|
||||
mmacrotools->addAction(command);
|
||||
connect(startMacro, &QAction::triggered, m_macroManager, &MacroManager::startMacro);
|
||||
|
||||
QAction *endMacro = new QAction(tr("Stop Recording Macro"), this);
|
||||
endMacro->setEnabled(false);
|
||||
command = Core::ActionManager::registerAction(endMacro, Constants::END_MACRO);
|
||||
command->setDefaultKeySequence(QKeySequence(Core::useMacShortcuts ? tr("Ctrl+)") : tr("Alt+)")));
|
||||
command->setDefaultKeySequence(QKeySequence(Core::useMacShortcuts ? tr("Ctrl+]") : tr("Alt+]")));
|
||||
mmacrotools->addAction(command);
|
||||
connect(endMacro, &QAction::triggered, m_macroManager, &MacroManager::endMacro);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user