Don't switch Location Bar mode with Escape key

Authored by ngraham on Sep 28 2017, 2:18 AM.


Group Reviewers

BUG: 383984

Don't switch from editable to breadcrumb mode when htting the Escape key.

Clients already implement their own ways to do this, or turn it off:

  • Dolphin: F6 key, context menu, ctrl+L, Location Bar > Editable Location menu item
  • Open/save dialogs: ctrl+L, context menu
  • Gwenview: F6 key, context menu, excape key behavior is already disabled
  • etc.
Test Plan

Tested in KDE Neon; rebuilt Dolphin against patched KIO. Escape key no longer switches to breadcrumb mode when currently in editable mode.

Diff Detail

R241 KIO
No Linters Available
No Unit Test Coverage
ngraham created this revision.Sep 28 2017, 2:18 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptSep 28 2017, 2:18 AM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript

The question is: why? I find Escape a natural way to exit editing and never used Ctrl+L. I don't fully understand the bug report. If Ctrl+L should only switch to edit mode, how would you exit again if you remove Escape handling?


This class is exported, you cannot remove any methods without breaking ABI. See

rkflx added a subscriber: rkflx.EditedSep 28 2017, 8:30 AM

-1 from me. It's a feature, not a bug. Esc is the standard way to return to previous GUI states, you use this subconsciously without needing to actively think about some other way (at least I do). In addition, Windows Explorer also does it the same way.

Clients already implement their own ways to do this

That's not correct for Ctrl+L you cite: This enters edit mode, but does not close it again. Only F6 works for this. Also, this should be a standard feature and not something each application needs to add (differently).

However there's one thing I'd love to be changed: Currently clicking on a folder to navigate away will close edit mode, but not clicking somewhere else outside of the location bar. This could be added and the checkmark button adding clutter removed or turned into an settings menu (more discoverable than the context menu we have currently). That's how Windows Explorer does it too, and it's logical: click inside the breadcrumb bar to open edit mode, click outside to close it again.

The tricky thing here is how this will interact with situations where the edit mode should always be active (I believe there's a config option for that? What about file dialogs?)

rkflx added a comment.EditedSep 28 2017, 9:07 AM

I don't fully understand the bug report.

The key point from the bug report is probably this:

If the config option 'editable location bar' is used

This patch disables Esc unconditionally, while it should only do it if the config option is set in Dolphin's or the file dialog's preferences.

If it were done that way, I could agree to the patch.

If it were done that way, I could agree to the patch.


ngraham planned changes to this revision.Oct 6 2017, 10:14 PM

Abandoning in favor of D16980, which I think makes more sense. In retrospect, you guys were right and this was a stupid idea: the escape key should definitely continue to work like it already does.

Restricted Application added a subscriber: kde-frameworks-devel. · View Herald TranscriptNov 18 2018, 3:51 PM
ngraham abandoned this revision.Nov 18 2018, 3:52 PM