Bug 458281

Summary: Pressing spacebar to trigger focused button in Selection Mode's contextual toolbar closes Selection Mode
Product: [Applications] dolphin Reporter: Nate Graham <nate>
Component: Selection ModeAssignee: KFM Developers <kfm-devel>
Status: RESOLVED FIXED    
Severity: normal CC: felixernst, kfm-devel
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 23.04
Sentry Crash Report:

Description Nate Graham 2022-08-25 05:13:40 UTC
STEPS TO REPRODUCE
1. Press spacebar to enter Selection Mode
2. Select one or more files
3. Use the Tab key to focus a button on the contextual toolbar
4. Press the spacebar to trigger the button


OBSERVED RESULT
Selection Mode exits.


EXPECTED RESULT
The button is triggered.


OTHER
Would you like me to create a new component for "Selection Mode" in the Dolphin product, or should we keep tracking them in the general view engine component?

Also Felix, would you like me to cc you by default on all new Dolphin bug reports, given that you're the new maintainer?
Comment 1 Felix Ernst 2022-08-25 10:06:02 UTC
Can confirm.

>Would you like me to create a new component for "Selection Mode" in the Dolphin product, or should we keep tracking them in the general view engine component?

I guess that makes sense. Please add it if you think that's a good idea.

>Also Felix, would you like me to cc you by default on all new Dolphin bug reports, given that you're the new maintainer?

I think it would potentially be quite bad for my ability to relax in my free time if I keep reading all the issues people have with Dolphin every day without being able to deal with all of them. It would ultimately make me way less productive I think. So while I see where you are coming from with this, I wouldn't want to be cc'd by default, no.
Comment 2 Nate Graham 2022-08-26 09:25:07 UTC
Got it!
Comment 3 Bug Janitor Service 2023-01-02 15:21:08 UTC
A possibly relevant merge request was started @ https://invent.kde.org/system/dolphin/-/merge_requests/486
Comment 4 Felix Ernst 2023-01-12 11:26:30 UTC
Git commit aac61acf41fb3ccd6f9a807984336d9be07917a4 by Felix Ernst, on behalf of Felix Ernst.
Committed on 12/01/2023 at 11:26.
Pushed by felixernst into branch 'release/22.12'.

Make space shortcut for selection mode view-local instead of global

Before this commit, the "Space" keyboard shortcut was bound to
triggering selection mode by default. After this commit, pressing
"Space" will only trigger selection mode when the file view area
has keyboard focus.

Pros:
+ Other buttons in the UI can be triggered with Space once again
  just like it is expected from an accessibility point of view.
+ "Type-ahead" searching works once more when typing the space
  char for file names containing such a space char.

Cons:
- "Space" can no longer be used to add the currently underlined
  item to the selection. Instead "Ctrl+Space" needs to be used.
  (However, this is the current status anyway unless a user has
  manually unbound "Space" as a shortcut from Selection Mode.)
- The Selection Mode action will no longer show "Space" as its
  shortcut in menus.

Overall, I see solutions to all of these problems, but they seem
over-engineered for the issues they are trying to solve, so I
believe this somewhat small commit is the best solution for now.
Related: bug 458282, bug 463048
FIXED-IN: 23.04


(cherry picked from commit 44c82a16b3e2fc2d40601fd70f8253dce40dda86)

M  +0    -1    src/dolphinmainwindow.cpp
M  +4    -7    src/kitemviews/kitemlistcontroller.cpp
M  +5    -0    src/kitemviews/private/kitemlistkeyboardsearchmanager.cpp
M  +10   -1    src/kitemviews/private/kitemlistkeyboardsearchmanager.h

https://invent.kde.org/system/dolphin/commit/aac61acf41fb3ccd6f9a807984336d9be07917a4