Grab the keyboard when KeySequenceItem is recording
ClosedPublic

Authored by davidre on Oct 17 2019, 1:59 PM.

Details

Summary

Otherwise assigning a key combination which is currently bound to a global
shortcut action will trigger the global shortcut.

Test Plan

Try to assign a global shortcut to KKeySequenceItem. The global shortcut is
not triggered - instead the steal shortcut prompt is displayed.

Diff Detail

Repository
R296 KDeclarative
Branch
grabkeyboard (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 17812
Build 17830: arc lint + arc unit
davidre created this revision.Oct 17 2019, 1:59 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptOct 17 2019, 1:59 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
davidre requested review of this revision.Oct 17 2019, 1:59 PM

Alternatively you could make the KeySequenceHelper itself a QQuickItem so it gets assigned a window.

src/qmlcontrols/kquickcontrols/private/keysequencehelper.cpp
117

Typically store items created by QtQuick in a QPointer so we can detect when they are garbage collected

src/qmlcontrols/kquickcontrols/private/keysequencehelper.h
63

this needs a NOTIFY argument, corresponding signal and emit in the setter

davidre updated this revision to Diff 68143.Oct 17 2019, 2:12 PM
  • Make helper a qquickitem instead
davidre updated this revision to Diff 68144.Oct 17 2019, 2:14 PM

Whitespace

davidedmundson accepted this revision.Oct 28 2019, 4:46 PM
This revision is now accepted and ready to land.Oct 28 2019, 4:46 PM
apol added a subscriber: apol.Oct 28 2019, 4:50 PM

+1 Makes sense to me.

apol accepted this revision.Oct 28 2019, 4:50 PM
This revision was automatically updated to reflect the committed changes.