Commit 4dd5bfab authored by Nate Graham's avatar Nate Graham
Browse files

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
parent 13a3dbf9
......@@ -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
......
Supports Markdown
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