Closed probonopd closed 3 years ago
Ctrl + F might be natural for many users. This is totally possible and easy.
By Invoke the Action Search do you mean something like the KRunner? Or Just focus on the Action Search Text Bar?
I'd say, just focus on the Action Search Text Bar.
Things like KRunner are nice but I'd assume that 99% of users will never even know that they exist, because they are hidden out of view unless you somehow magically happen to know that they exist, and how to bring them up. This is why I like to have a visible search box in the menu at all times - everyone will find it. (A tooltip could then show the shortcut used to focus in it.)
What do you think?
Ctrl + F might be natural for many users. This is totally possible and easy.
I doubt this would make sense as CTRL+F for many is to search for some text within a document. What would be do if our application is a PDF viewer for instance? Perhaps we should utilise the Win/Command key a bit more like Command+F.
Okay let's settle with Command + Space like in Macs.
Can you explain me how to do it @antony-jr?
QShortcut is the class you are looking for. The combination for Meta and Key F is Qt::META + Qt::Key_F
.
If I have time I will send a PR.
Thing is, Alt-Space currently results in a window manager context menu popping up. Will QShortcut be able to override this?
Nope. You can't override keyboard shortcuts better to try a different one that is available.
Or change the window manager configuration not to claim Alt-Space. I am doing this now. So Alt-Space is available for use by Qt.
@antony-jr I have now configured the system so that Alt-Space is not intercepted by the window manager any more.
We'd need Alt-Space to make the Menubar the active application (I guess), and put the cursor into the search box. Doable?
@probonopd Yes. I think it is doable. But the problem is I can't test it to a full extent. I think I will install the BSD iso in VM and try it out.
EDIT: Because my distro also has shortcut for Alt+Space.
It seems that OpenSUSE Tumbleweed also has Alt+Space mapped to the KRunner which is Interesting.
Found a solution Will be in the next build.
Make it possbile to invoke Action Search by a command. E.g., Ctrl-Shift-/