Bug 465497 - Show Ctrl+F keyboard shortcut to placeholder text in Kirigami.SearchField
Summary: Show Ctrl+F keyboard shortcut to placeholder text in Kirigami.SearchField
Status: RESOLVED INTENTIONAL
Alias: None
Product: frameworks-kirigami
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.102.0
Platform: Other Linux
: NOR minor
Target Milestone: Not decided
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-09 03:10 UTC by Jakob Petsovits
Modified: 2023-02-12 19:21 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jakob Petsovits 2023-02-09 03:10:13 UTC
SUMMARY

Opening a new issue here to avoid going even further off-topic in the Flattened Navigation task at https://invent.kde.org/plasma/systemsettings/-/issues/15#note_600809. Adding even more settings pages without introducing an initial "table of contents" page means that Systems Settings should probably double down on search.

The search field is already focused on app startup, which is good. However, after navigating to some other page I was trying the standard browser shortcuts Ctrl+L and Ctrl+K, neither of them worked to focus the search field again. Later I discovered that the hover text actually hints towards the correct shortcut.

Perhaps the placeholder text can have the keyboard shortcut added at the back for immediate discoverability? It would read: "Search... (Ctrl+F)" instead of just "Search...", so you don't have to hover it to get reminded.

Ideally this would be done across the board in all search fields that can fit the extra shortcut hint. But I'd be happy to just have it in System Settings, too.


STEPS TO REPRODUCE
1. Open System Settings
2. Stare at the search field
3. Guess what the shortcut to focus it might be

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.26.5
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8
Comment 1 Nate Graham 2023-02-12 17:00:09 UTC
Hmm, not sure what the issue is here. Ctrl+F is pretty much the standard keyboard shortcut for searching everywhere; not sure why you would try Ctrl+L or Ctrl+K. The tooltip even mentions the correct shortcut as well, and you did eventually figure it out. If we added the shortcut into the placeholder text, we would surely get complaints that it's unnecessary people people already know the shortcut! I think there isn't anything we can do here to improve the situation without also making it worse in some way, sorry!
Comment 2 Jakob Petsovits 2023-02-12 18:26:56 UTC
Ctrl+F is indeed the standard searching shortcut. However, there is a difference between searching in a document or "active view", and navigating to a different location.

If I use Ctrl+F in a web browser, I get the inline search field that searches the current web page, rather than DuckDuckGo search results. If I use Ctrl+F in Dolphin, it looks for files in the current directory, rather than taking me to the location field.

If I use Ctrl+L in a web browser, it takes me to the location field which is conveniently also a search field for my default search engine. Ctrl+K to the dedicated search field for people who have both as distinct fields. If I use Ctrl+L in Dolphin, it takes me to the location bar to allow navigating outside the current directory by typing a path.

The search field in System Settings is sort of two in one. It searches both KCM names and KCM contents. If I want to find a particular setting, I'll think Ctrl+F, although my default assumption would be that this only works within the current page because that's what Ctrl+F is commonly used for. If I want to find a particular page, I'll think Ctrl+L or Ctrl+K. The search bar in System Settings is its location bar, allowing to navigate to a particular page.

This is why Ctrl+F is not intuitive for me. Although perhaps the solution would be to simply set Ctrl+L and perhaps also Ctrl+K in addition to the default Ctrl+F shortcut. Then people who associate Ctrl+F with the search bar will still be happy, and people who associate Ctrl+L or Ctrl+K with the "location bar" will also be happy. I guess I can open a different bug for that though, so, not reopening.
Comment 3 Nate Graham 2023-02-12 18:29:16 UTC
Ctrl+F generally searches or filters through what's visible in the active view. That's what it does in System Settings too.
Comment 4 Jakob Petsovits 2023-02-12 19:21:42 UTC
I opened a spin-off Bug #465632 to suggest the additional Ctrl+L shortcut, and commented on bug 438689 as Ctrl+F doesn't work once a KCM view is focused. Related but separate issues.