From 3cf77370424c6fb92401830317f1155ffb6e14e9 Mon Sep 17 00:00:00 2001 From: Nate Graham Date: Fri, 26 Aug 2022 12:53:33 +0200 Subject: [PATCH] effects: add Meta+plus as a default shortcut for Zoom effect Right now the Zoom effect's "zoom in" action is bound by Meta+Equals, which makes sense for ANSI US keyboards without numberpads which make you hit the Shift key before you can get a plus sign, and pressing it without Shift gets you an Equals sign. But some ANSI US keyboards have a numberpad with a Plus key, and many other keyboards without numberpads also have a Plus key, so we should allow users of those keyboards to trigger "zoom in" as easily as users of ANSI US keyboards. --- src/effects/zoom/zoom.cpp | 4 ++-- src/effects/zoom/zoom_config.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/effects/zoom/zoom.cpp b/src/effects/zoom/zoom.cpp index 6eafffd439..bc99def18c 100644 --- a/src/effects/zoom/zoom.cpp +++ b/src/effects/zoom/zoom.cpp @@ -47,8 +47,8 @@ ZoomEffect::ZoomEffect() initConfig(); QAction *a = nullptr; a = KStandardAction::zoomIn(this, SLOT(zoomIn()), this); - KGlobalAccel::self()->setDefaultShortcut(a, QList() << (Qt::META | Qt::Key_Equal)); - KGlobalAccel::self()->setShortcut(a, QList() << (Qt::META | Qt::Key_Equal)); + KGlobalAccel::self()->setDefaultShortcut(a, QList() << (Qt::META | Qt::Key_Plus)); + KGlobalAccel::self()->setShortcut(a, QList() << (Qt::META | Qt::Key_Plus) << (Qt::META | Qt::Key_Equal)); effects->registerGlobalShortcut(Qt::META | Qt::Key_Equal, a); effects->registerAxisShortcut(Qt::ControlModifier | Qt::MetaModifier, PointerAxisDown, a); diff --git a/src/effects/zoom/zoom_config.cpp b/src/effects/zoom/zoom_config.cpp index 59c0603157..65ceca7424 100644 --- a/src/effects/zoom/zoom_config.cpp +++ b/src/effects/zoom/zoom_config.cpp @@ -62,8 +62,8 @@ ZoomEffectConfig::ZoomEffectConfig(QWidget *parent, const QVariantList &args) QAction *a; a = actionCollection->addAction(KStandardAction::ZoomIn); a->setProperty("isConfigurationAction", true); - KGlobalAccel::self()->setDefaultShortcut(a, QList() << (Qt::META | Qt::Key_Equal)); - KGlobalAccel::self()->setShortcut(a, QList() << (Qt::META | Qt::Key_Equal)); + KGlobalAccel::self()->setDefaultShortcut(a, QList() << (Qt::META | Qt::Key_Plus)); + KGlobalAccel::self()->setShortcut(a, QList() << (Qt::META | Qt::Key_Plus) << (Qt::META | Qt::Key_Equal)); a = actionCollection->addAction(KStandardAction::ZoomOut); a->setProperty("isConfigurationAction", true);