Opened 9 months ago

Last modified 6 months ago

#14809 new enhancement

Implement 1-letter search shortcuts (easy)

Reported by: pulkomandy Owned by: pulkomandy
Priority: normal Milestone: Unscheduled
Component: Applications/WebPositive Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All


WebPositive should allow easy searching on some common websites. The search preferences should be reworked to allow listing multiple search engines (of which one would be the default for the current use of typing something that's not an URL). For example, typing "w foo" in the address bar should search "foo" on wikipedia. "g foo" on Google. "q foo" on Qwant, etc.

Change History (5)

comment:1 by yatendra1999, 7 months ago

If i wanted to search "q bit" on the default engine, redirecting to Qwant may cause problems.

in reply to:  1 comment:2 by yatendra1999, 7 months ago

Replying to yatendra1999:

If i wanted to search "q bit" on the default engine, redirecting to Qwant may cause problems.

Or is it compulsory to define the search engine to be used like "g q bit"?

comment:3 by pulkomandy, 7 months ago

It depends what you type. The existing code already tries to do smart things

For example:

  • stdio.h -> contains a . so it is searched as a domain (annoying)
  • q bit -> search on qwant
  • g q bit -> search on google
  • g stdio.h -> search on google

We could make this even better by having suggestions in the completion popup. For example if you type q bit, the first and selected by default entry would be "search 'bit' on qwant", but using up/down arrow keys you can easily select "search q bit with default search engine". At least it would not be too annoying this way.

I think the Vivaldi browser does something like that, it is great because it gives you an idea of what will happen.

Note that if by default no shortcuts are configured, nothing will happen. It's just a possibility for the user to add more search engines.

If single-letter is found too easy to trigger, we can also use a different shortcut, for example !g or &g or whatever we decide one (slight preference for these because they are the syntax used by duckduckgo and qwant to search on other engines - but using a character not allowed in URLs may be a good idea too).

comment:4 by SyedSouban890, 6 months ago

Hi there. I am working on this ticket and would like to contribute to it. (This is to improve my GSOC application)

comment:5 by SyedSouban890, 6 months ago

Here is my implementation @PulkoMandy please review my code.

Note: See TracTickets for help on using tickets.