Fix shortcut conflict between Cut and Delete File
AbandonedPublic

Authored by ngraham on Dec 3 2019, 8:25 PM.

Details

Reviewers
cfeck
Group Reviewers
Frameworks
Summary

+Delete is bound to both Cut and Delete File, meaning that it can't be used
for either one.

I chose to remove this shortcut from the Cut action since it already has another shortcut
that's one of the most commonly-known keyboard shortcuts of all. The alternative is
removing or changing the sole shortcut for Delete File, which seemed less desirable.

BUG: 414799
FIXED-IN: 5.65

Test Plan

Shortcuts no longer conflict in the KCM

Diff Detail

Repository
R237 KConfig
Branch
fix-shortcut-conflict (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 19454
Build 19472: arc lint + arc unit
ngraham created this revision.Dec 3 2019, 8:25 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptDec 3 2019, 8:25 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
ngraham requested review of this revision.Dec 3 2019, 8:25 PM
apol added a subscriber: apol.Dec 4 2019, 1:03 AM

+1 it doesn't seem to me that shift+delete is used elsewhere.

ngraham edited the test plan for this revision. (Show Details)Dec 4 2019, 1:06 AM
ngraham edited the summary of this revision. (Show Details)
aacid added a subscriber: aacid.Dec 4 2019, 8:24 AM

Shift + Delete for cut is the old timer Unix cut shortcut, you're going to piss lots of people off if you remove that shortcut from every single application just because it causes a conflict in applications that do file management

It's not just old timers, it's an accessibility thing for people who are left handed.

Ack. So shall we change the shortcut for delete file then? Any suggestions?

Shift+Delete is a widely known shortcut combination for "Delete File Immediately, do not send to the Recycle Bin"

We have to change something, or else there's conflict that breaks both of them in apps where both actions are implemented. Changing anything breaks someone's workflow; the question is whose we can live with breaking.

What are the applications where both actions are used and thus one may notice this conflict?

For example Dolphin

Though Dolphin seems to have some kind of local hack to make Shift+delete work for file deletion. But it doesn't work for Cut. It's all pretty messy.

Though Dolphin seems to have some kind of local hack to make Shift+delete work for file deletion. But it doesn't work for Cut. It's all pretty messy.

I don't know the internals of Dolphin, but it works. And I still don't get why we need to change anything in KConfig.

aacid added a comment.Dec 4 2019, 9:13 PM

Apps that need both should be aware of it and remove the secondary Cut shortcut.

Or if you want to be mega fancy you can make kactioncollection (or something in xmlgui) do that

Apps that need both should be aware of it and remove the secondary Cut shortcut.

Or if you want to be mega fancy you can make kactioncollection (or something in xmlgui) do that

I don't think we should make apps work around problems in a framework. You can also see the issue in System Setting itself. Trying to assign anything to Shift+Delete shows the "conflicting shortcuts" error dialog.

aacid added a comment.Dec 5 2019, 11:00 PM

Trying to assign anything to Shift+Delete shows the "conflicting shortcuts" error dialog.

But that's fine, no?

I mean this is the user assigning a shortcut that already exists, not any different than the user trying to assign Ctrl+C somewhere. If he doesn't like the conflict, she can go to the other one and remove it, no?

Though Dolphin seems to have some kind of local hack to make Shift+delete work for file deletion. But it doesn't work for Cut. It's all pretty messy.

Yes it's messy but it's Microsoft fault since they chose to use an already used shortcut for another thing and we are doomed.

Some years ago I submitted the very same patch and it eventually led to 8eabbf6725386e716b7536c71a9181dfe5d959f0 in kxmlgui, which automatically handles the conflict for those few apps that need both actions (dolphin, gwenview, etc.)

(Too bad reviewboard was shutdown, I had to dig in my mail to find it :/)

So imho #414799 should be closed as intentional.

ngraham abandoned this revision.Dec 9 2019, 4:05 PM

All right. Thanks for the history!

Though Dolphin seems to have some kind of local hack to make Shift+delete work for file deletion. But it doesn't work for Cut. It's all pretty messy.

Yes it's messy but it's Microsoft fault since they chose to use an already used shortcut for another thing and we are doomed.

Some years ago I submitted the very same patch and it eventually led to 8eabbf6725386e716b7536c71a9181dfe5d959f0 in kxmlgui, which automatically handles the conflict for those few apps that need both actions (dolphin, gwenview, etc.)

(Too bad reviewboard was shutdown, I had to dig in my mail to find it :/)

So imho #414799 should be closed as intentional.

May I suggest adding a comment in the code here mentioning 8eabbf6725386e716b7536c71a9181dfe5d959f0 for future reference? :)