Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12:Update
libqt5-qtbase.620
0005-Translate-Super-Hyper-keys-to-MetaModifier...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0005-Translate-Super-Hyper-keys-to-MetaModifier.patch of Package libqt5-qtbase.620
From 51d6df1d18322c630f79567ed22de3718436d78d Mon Sep 17 00:00:00 2001 From: Gatis Paeglis <gatis.paeglis@digia.com> Date: Tue, 17 Jun 2014 11:41:23 +0200 Subject: [PATCH 1/1] Translate Super/Hyper keys to MetaModifier MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is how it was done in Qt4. If users are interested in an actual X11 keysym they can use QKeyEvent::nativeVirtualKey(). Change-Id: I710664e48c5db1633a357aa0a5d238f3453103ab Task-number: QTBUG-38428 Reviewed-by: Christian Stenger <christian.stenger@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sebastian Kügler <sebas@kde.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> --- src/plugins/platforms/xcb/qxcbkeyboard.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/plugins/platforms/xcb/qxcbkeyboard.cpp b/src/plugins/platforms/xcb/qxcbkeyboard.cpp index 69601f4..4c84b19 100644 --- a/src/plugins/platforms/xcb/qxcbkeyboard.cpp +++ b/src/plugins/platforms/xcb/qxcbkeyboard.cpp @@ -929,6 +929,15 @@ int QXcbKeyboard::keysymToQtKey(xcb_keysym_t key) const i += 2; } + if (rmod_masks.meta) { + // translate Super/Hyper keys to Meta if we're using them as the MetaModifier + if (rmod_masks.meta == rmod_masks.super && (code == Qt::Key_Super_L || code == Qt::Key_Super_R)) { + code = Qt::Key_Meta; + } else if (rmod_masks.meta == rmod_masks.hyper && (code == Qt::Key_Hyper_L || code == Qt::Key_Hyper_R)) { + code = Qt::Key_Meta; + } + } + return code; } -- 1.9.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor