<table><tr><td style="">rjvbb added a comment.</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/D1523" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>I'm not getting the shortcut changes applied through an <tt style="background: #ebebeb; font-size: 13px;">actionCollection()</tt> to work. They show up, and I do get conflict warnings about Key_Delete until I change the shortcut on the Project Manager's "Remove..." action. But for some reason the old shortcuts remain active.</p>
<p>I've also realised that these shortcuts are apparently enabled only when the project manager has focus, so not when you're editing a file for instance. That's logical, but IMHO it also means that there's a lot less point in having shortcuts. Shortcuts are extremely useful if they can prevent you from having to go for the mouse, but if you're already using the mouse instead of the keyboard you can almost apply the opposite argument. IOW, I'm now running a local patch which removes the F2 shortcut (just use a right-click to select a file to be renamed and use the context menu). It also remaps the Remove shortcut to the one used in the Finder; that could of course be a Mac-specific change.</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="diff" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);"><span style="color: #000080">diff --git plugins/projectmanagerview/projectmanagerview.cpp plugins/projectmanagerview/projectmanagerview.cpp</span>
<span style="color: #000080">index f08fe23..e8eeca1 100644</span>
<span style="color: #a00000">--- plugins/projectmanagerview/projectmanagerview.cpp</span>
<span style="color: #00a000">+++ plugins/projectmanagerview/projectmanagerview.cpp</span>
<span style="color: #800080">@@ -146,12 +146,12 @@ bool ProjectManagerView::eventFilter(QObject* obj, QEvent* event)</span>
if (obj == m_ui->projectTreeView) {
if (event->type() == QEvent::KeyRelease) {
QKeyEvent* keyEvent = static_cast<QKeyEvent*>(event);
<span style="color: #a00000">- if (keyEvent->key() == Qt::Key_Delete && keyEvent->modifiers() == Qt::NoModifier) {</span>
<span style="color: #00a000">+ if (keyEvent->key() == Qt:: Key_Backspace && keyEvent->modifiers() == Qt::ControlModifier) {</span>
m_plugin->removeItems(selectedItems());
return true;
<span style="color: #a00000">- } else if (keyEvent->key() == Qt::Key_F2 && keyEvent->modifiers() == Qt::NoModifier) {</span>
<span style="color: #a00000">- m_plugin->renameItems(selectedItems());</span>
<span style="color: #a00000">- return true;</span>
<span style="color: #00a000">+// } else if (keyEvent->key() == Qt::Key_F2 && keyEvent->modifiers() == Qt::NoModifier) {</span>
<span style="color: #00a000">+// m_plugin->renameItems(selectedItems());</span>
<span style="color: #00a000">+// return true;</span>
} else if (keyEvent->key() == Qt::Key_C && keyEvent->modifiers() == Qt::ControlModifier) {
m_plugin->copyFromContextMenu();
return true;</pre></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>rKDEVPLATFORM KDevPlatform</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D1523" rel="noreferrer">https://phabricator.kde.org/D1523</a></div></div><br /><div><strong>EMAIL PREFERENCES</strong><div><a href="https://phabricator.kde.org/settings/panel/emailpreferences/" rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br /><div><strong>To: </strong>rjvbb, mwolff, KDevelop<br /><strong>Cc: </strong>mwolff, kdevelop-devel, KDevelop, Pilzschaf, akshaydeo, surgenight, joshiakshay, arrowdodger<br /></div>