When inside search results with searchentry defocused, allow `Ctrl+F` to refocus it and select all its contents (instead of clearing the search)
Affected version
- Nightly flatpak: Yes
- Other: 43.2 and every previous version
Use cases
When you search for something, and use the keyboard to navigate through some results, or do some selections/operations with the mouse on some of the files and folders, this defocuses the searchentry. The problem is that if you want te refocus it afterwards, you have no choice but to (remember to) use the mouse because the Ctrl+F
keyboard shortcut will clear / toggle out of the search mode entirely, instead of simply focusing the searchentry (and hopefully doing a "select all on it").
I would like to be able to easily re-focus the searchentry.
If I want to clear the search entry from the keyboard, I would either press the Esc
key directly (which already works!), or (with my suggested change below) Ctrl+F
then Esc
or Ctrl+F
then Backspace
.
Available features and workarounds
Remembering to click the searchbar's searchentry field with the mouse cursor, instead of reusing the keyboard shortcut... but I never remember. It is a reflex for me to hit Ctrl+F all the time.
Difficulties and insufficiencies
Most of the time I want to correct, refine, or replace a search rather than clear it entirely. Clearing the search is unexpected behavior for me most of the time, and clearing the search has a huge performance cost/impact, because most of the time it means resetting the view to a folder containing many items, and exiting/reentering search mode takes much more time than refining a search.
Suggested enhancements
When the searchbar is active but unfocused (because you interacted with the grid or listview), hitting Ctrl+F should bring focus back to the searchentry widget (instead of closing/dismissing the search mode), and ideally select all of its text automatically;
- If the user then wants to clear it, they can either press
Esc
orBackspace
(which would remove all the selected searchentry text) - If the user wants to replace the entire query with a new one, they can start typing straight away
- If the user wants to append the contents of the entry, they can use the keyboard's left or right arrows (or mouse cursor) to deselect-and-navigate
...so this would be generally safer (in terms of not "losing" the user data that the search query text represents) and better for performance (in terms of not unexpectedly needing to show the unfiltered folder if the user didn't intend to).
This "safe" approach is how many other apps (such as Firefox, LibreOffice, Thunderbird, etc.) work.