D6060: platform-specific document switcher default shortcuts (WIP)
René J.V. Bertin
noreply at phabricator.kde.org
Thu Jun 1 15:46:13 UTC 2017
rjvbb created this revision.
rjvbb added a project: KDevelop.
Restricted Application added a subscriber: kdevelop-devel.
REVISION SUMMARY
The document switcher plugin defines its default shortcuts as Ctrl+Tab and Ctrl+Shift+Tab. On Mac this translates to Command[+Shift]+Tab, which are intercepted by the host and trigger the application switcher. I *think* that something similar will happen on MSWindows.
To make things more complicated, Qt/Mac has an attribute that tells the keyboard event functions NOT to swap the Control and Meta (Command) keys, and an as-yet unidentified bug (probably) in KF5 code causes Control+Tab shortcuts to be discarded.
The patch introduces a platform-specific `shortcutAccelerator` variable that is set to Qt::CTRL except when running on Mac and the DontSwapCtrlAndMeta attribute is set. In the latter case it is set to Qt::ALT (instead of Qt::META). If the Qt::ALT modifier is defined on MSWindows it could be used there too.
TEST PLAN
Works as intended on Linux and Mac, with Qt 5.8.0 and the Cocoa as well as the XCB QPA plugins.
The patch applies to the 5.1 branch.
REPOSITORY
R33 KDevPlatform
REVISION DETAIL
https://phabricator.kde.org/D6060
AFFECTED FILES
plugins/documentswitcher/documentswitcherplugin.cpp
To: rjvbb, #kdevelop
Cc: kdevelop-devel, kde-mac, geetamc, Pilzschaf, akshaydeo, surgenight, arrowdodger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170601/09224e67/attachment.html>
More information about the KDevelop-devel
mailing list