Remove "move zoomed area" shortcuts by default

Summary: This is a follow-up for D11377, as requested by @graesslin. The patch removes the default shortcuts for the {nav Move zoomed area} actions.

Test Plan:
Deployed KWin with patch, killed and restarted KWin, created and logged into new user account, then zoomed in:
- {key Meta Ctrl Arrows} do not move the zoomed view
- The actions are still visible (without shortcuts) in {nav System Settings > Shortcuts > Global Shortcuts > KWin}
- You can still set custom shortcuts for the actions, and they work

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: graesslin, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D11526
This commit is contained in:
Nathaniel Graham 2018-03-20 12:58:26 -06:00
parent 13a3dbf9de
commit 4dd5bfab09

View file

@ -82,33 +82,33 @@ ZoomEffect::ZoomEffect()
a = new QAction(this);
a->setObjectName(QStringLiteral("MoveZoomLeft"));
a->setText(i18n("Move Zoomed Area to Left"));
KGlobalAccel::self()->setDefaultShortcut(a, QList<QKeySequence>() << Qt::META + Qt::CTRL + Qt::Key_Left);
KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>() << Qt::META + Qt::CTRL + Qt::Key_Left);
effects->registerGlobalShortcut(Qt::META + Qt::CTRL + Qt::Key_Left, a);
KGlobalAccel::self()->setDefaultShortcut(a, QList<QKeySequence>());
KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>());
effects->registerGlobalShortcut(QKeySequence(), a);
connect(a, SIGNAL(triggered(bool)), this, SLOT(moveZoomLeft()));
a = new QAction(this);
a->setObjectName(QStringLiteral("MoveZoomRight"));
a->setText(i18n("Move Zoomed Area to Right"));
KGlobalAccel::self()->setDefaultShortcut(a, QList<QKeySequence>() << Qt::META + Qt::CTRL + Qt::Key_Right);
KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>() << Qt::META + Qt::CTRL + Qt::Key_Right);
effects->registerGlobalShortcut(Qt::META + Qt::CTRL + Qt::Key_Right, a);
KGlobalAccel::self()->setDefaultShortcut(a, QList<QKeySequence>());
KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>());
effects->registerGlobalShortcut(QKeySequence(), a);
connect(a, SIGNAL(triggered(bool)), this, SLOT(moveZoomRight()));
a = new QAction(this);
a->setObjectName(QStringLiteral("MoveZoomUp"));
a->setText(i18n("Move Zoomed Area Upwards"));
KGlobalAccel::self()->setDefaultShortcut(a, QList<QKeySequence>() << Qt::META + Qt::CTRL + Qt::Key_Up);
KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>() << Qt::META + Qt::CTRL + Qt::Key_Up);
effects->registerGlobalShortcut(Qt::META + Qt::CTRL + Qt::Key_Up, a);
KGlobalAccel::self()->setDefaultShortcut(a, QList<QKeySequence>());
KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>());
effects->registerGlobalShortcut(QKeySequence(), a);
connect(a, SIGNAL(triggered(bool)), this, SLOT(moveZoomUp()));
a = new QAction(this);
a->setObjectName(QStringLiteral("MoveZoomDown"));
a->setText(i18n("Move Zoomed Area Downwards"));
KGlobalAccel::self()->setDefaultShortcut(a, QList<QKeySequence>() << Qt::META + Qt::CTRL + Qt::Key_Down);
KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>() << Qt::META + Qt::CTRL + Qt::Key_Down);
effects->registerGlobalShortcut(Qt::META + Qt::CTRL + Qt::Key_Down, a);
KGlobalAccel::self()->setDefaultShortcut(a, QList<QKeySequence>());
KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>());
effects->registerGlobalShortcut(QKeySequence(), a);
connect(a, SIGNAL(triggered(bool)), this, SLOT(moveZoomDown()));
// TODO: these two actions don't belong into the effect. They need to be moved into KWin core