When I want to assign a new shortcut in kde5 systemsettings with Meta key. Garbaged is recognized. ctrl, shift modifiers working fine. Reproducible: Always Steps to Reproduce: 1.systemsettings start shortcuts and gestures 2.Try to assign an new shortcut 3. Actual Results: Garbage keys +D Expected Results: Meta+D
Created attachment 86806 [details] example shortcut assignment
Would you be able to test if this fixes it please. https://codereview.qt-project.org/#change,86598
This is a problem in Qt, and is fixed in the patch linked above. Now we just need it to be accepted.
The Qt patch solves the problem for me partly. The test program now behaves as expected on my system, but I cannot assign meta as shortcut modifier. The behaviour in the shortcuts editor is now as follows: - open shortcuts editor - click on shortcut - [widget now waits for input] - press meta - [widget assigns "Meta<GARBAGE>"] - here the widget should still wait for input, but it assigns right away I'll attach a screenshot showing what's going on here.
Created attachment 87034 [details] behavior with Qt patch kkeysequencewidget in shortcuts editor, with Qt patch
Alright, it seems KKeySequenceWidget needs the same kind of treatment, with a small patch, it all works as expected: diff --git a/src/kkeysequencewidget.cpp b/src/kkeysequencewidget.cpp index b6fcd20..fdba9b9 100644 --- a/src/kkeysequencewidget.cpp +++ b/src/kkeysequencewidget.cpp @@ -734,6 +734,8 @@ void KKeySequenceButton::keyPressEvent(QKeyEvent *e) case Qt::Key_Control: case Qt::Key_Alt: case Qt::Key_Meta: + case Qt::Key_Super_L: + case Qt::Key_Super_R: case Qt::Key_Menu: //unused (yes, but why?) d->controlModifierlessTimout(); d->updateShortcutDisplay(); I've filed a review request here: https://git.reviewboard.kde.org/r/118581/
*** Bug 334445 has been marked as a duplicate of this bug. ***
Git commit d8e40e8579f559819a703c37cdca7849b618dc55 by Sebastian Kügler. Committed on 06/06/2014 at 00:32. Pushed by sebas into branch 'master'. Consider Super_L and Super_R as modifiers Without this patch, I can't use the meta key to assign shortcuts, as Super_L and Super_R are not considered as modifiers, so when I press meta (Super_L on my system), the shortcut is immediately accepted, before I get the chance to press another key. This patch requires the fix in https://bugreports.qt-project.org/browse/QTBUG-38428 to be applied. With both patches, KKeySequenceWidget works for me. REVIEW:118581 M +2 -0 src/kkeysequencewidget.cpp http://commits.kde.org/kxmlgui/d8e40e8579f559819a703c37cdca7849b618dc55
Git commit 7eaa20924b99e3fa92ec3aaddef3631e7400f3e8 by Sebastian Kügler. Committed on 09/06/2014 at 22:01. Pushed by sebas into branch 'master'. Consider Super_L and Super_R as modifiers Without this patch, I can't use the meta key to assign shortcuts, as Super_L and Super_R are not considered as modifiers, so when I press meta (Super_L on my system), the shortcut is immediately accepted, before I get the chance to press another key. This patch requires the fix in https://bugreports.qt-project.org/browse/QTBUG-38428 to be applied. With both patches, the QtQuick widgets to assign shortcuts works for me also with the Meta key. Suggested by David Edmundson in review request at https://git.reviewboard.kde.org/r/118581/ If the upstream Qt fix changes, we'll have to readjust here, but at least now we have a good chance of it working. REVIEW:118630 M +2 -0 src/qmlcontrols/kquickcontrols/private/keysequencehelper.cpp http://commits.kde.org/kdeclarative/7eaa20924b99e3fa92ec3aaddef3631e7400f3e8