KKeySequenceWidget: make it possible to record Ctrl+Num+1 as a shortcut.
ClosedPublic

Authored by dfaure on Jun 15 2017, 7:29 AM.

Details

Summary

Qt supports this string representation for Qt::KeypadModifier since 5.1
but this code didn't support that modifier.

This is the easy part of the fix for the 8-years-old bug, and it makes
it possible to use the numeric keypad for application shortcuts.

The bigger issue is handling of keypad modifiers in global shortcuts
(patches to come for kwindowsystem and kglobalaccel).

CCBUG: 183458

Test Plan

Set shortcut Ctrl+Num+1 for "decrement number by 1" action in kate, works.

Diff Detail

Repository
R263 KXmlGui
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
dfaure created this revision.Jun 15 2017, 7:29 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptJun 15 2017, 7:29 AM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript
apol added a subscriber: apol.Jun 15 2017, 10:06 AM

+1 makes sense

aacid accepted this revision.Jun 15 2017, 9:08 PM
This revision is now accepted and ready to land.Jun 15 2017, 9:08 PM
dfaure closed this revision.Jun 16 2017, 7:30 AM
davidedmundson added inline comments.
src/kkeysequencewidget.cpp
778

Should this section be using ShiftModifier? Qt::SHIFT has been masked out

dfaure added inline comments.Jun 18 2017, 5:45 PM
src/kkeysequencewidget.cpp
778

qglobal.h: SHIFT = Qt::ShiftModifier
so it's the same (in case your sentence was making a difference about the two).

And Shift hasn't been masked out, it's been masked in :)