<table><tr><td style="">rjvbb created this revision.<br />rjvbb added a project: KDevelop.<br />Restricted Application added a subscriber: kdevelop-devel.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D6060" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>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.</p>
<p>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.</p>
<p>The patch introduces a platform-specific <tt style="background: #ebebeb; font-size: 13px;">shortcutAccelerator</tt> 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.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Works as intended on Linux and Mac, with Qt 5.8.0 and the Cocoa as well as the XCB QPA plugins.</p>
<p>The patch applies to the 5.1 branch.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R33 KDevPlatform</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D6060" rel="noreferrer">https://phabricator.kde.org/D6060</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>plugins/documentswitcher/documentswitcherplugin.cpp</div></div></div><br /><div><strong>To: </strong>rjvbb, KDevelop<br /><strong>Cc: </strong>kdevelop-devel, kde-mac, geetamc, Pilzschaf, akshaydeo, surgenight, arrowdodger<br /></div>