Bug 458282 - Type-ahead inappropriately enters Selection Mode if you type slowly
Summary: Type-ahead inappropriately enters Selection Mode if you type slowly
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: Selection Mode (show other bugs)
Version: 22.12.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
: 464932 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-08-25 05:17 UTC by Nate Graham
Modified: 2023-01-28 11:14 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 23.04


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2022-08-25 05:17:52 UTC
STEPS TO REPRODUCE
1. Have a file named "Giant Ship Poster.jpg" in a folder you're in
2. Slowly type the name of the file


OBSERVED RESULT
Dolphin selects the file but also enters Selection Mode


EXPECTED RESULT
Dolphin just selects the file


ADDITIONAL INFORMATION
Seems to be based on the speed of typing; if I type the name really fast, it becomes selected without entering Selection Mode.
Comment 1 Dashon 2022-12-15 15:42:22 UTC
I only just started running into this with dolphin version 22.12.0 except it doesn't matter if you type fast. If you press the space bar at all. You will enter selection mode.
Comment 2 Dashon 2022-12-15 19:29:41 UTC
Also there is this bug about type ahead speed https://bugs.kde.org/show_bug.cgi?id=424416
Comment 3 prettyvanilla 2022-12-21 20:54:23 UTC
As Dashon says, selection mode is now unexpectedly entered in Dolphin 22.12.0 whenever you press spacebar no matter how fast you type. Given Nate's original observation I'm wondering if the responsible code has changed since and originally tried to detect whether you were in typeahead mode (which has been tied to typing speed for as long as I have been aware of the feature I think) and doesn't now.

This is more annoying when the matched entry before the space is different from the intended one which can easily happen, e.g. a folder may contain:
- One Directory/
- One Directory More/
- One True Directory/

Typing "One " will enter selection mode and will have "One Directory" selected, when I intended to enter "One T..." to have "One True Directory" selected.
Comment 4 Felix Ernst 2022-12-22 13:07:18 UTC
Not sure how soon this bug will be resolved, but if you are really annoyed by this you can unbind "Select Files and Folders" from "Space" as a workaround so it won't interfere with type-ahead anymore.
Comment 5 Dashon 2022-12-22 16:29:04 UTC
(In reply to Felix Ernst from comment #4)
> Not sure how soon this bug will be resolved, but if you are really annoyed
> by this you can unbind "Select Files and Folders" from "Space" as a
> workaround so it won't interfere with type-ahead anymore.

Thanks for the tip, since spacebar was the trigger for this. I hadn't even thought to check my keyboard shortcuts.
Comment 6 Bug Janitor Service 2023-01-02 15:21:06 UTC
A possibly relevant merge request was started @ https://invent.kde.org/system/dolphin/-/merge_requests/486
Comment 7 Felix Ernst 2023-01-12 11:26:38 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 458281, 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
Comment 8 Felix Ernst 2023-01-28 11:14:58 UTC
*** Bug 464932 has been marked as a duplicate of this bug. ***