lusakasa / saka-key

A keyboard interface to the web
https://key.saka.io
MIT License
860 stars 70 forks source link

Clipboard paste should use default search engine instead of hardcoded Google search #315

Open ropery opened 3 years ago

ropery commented 3 years ago

When I use the key-binding for "Activate Clipboard *" to paste a non-URL foo, saka-keys translates it a Google search query URL, disregarding the default search engine.

The expected behavior should be equivalent to typing foo in the Firefox URL bar & hitting Enter, i.e., querying the default search engine for foo.

The relevant source lines:

https://github.com/lusakasa/saka-key/blob/3ec7984c1a1d630f6c1eb5b9a6932678cf6a21a3/src/modes/command/background/commands/clipboard.js#L5-L7

https://github.com/lusakasa/saka-key/blob/cd2aa75416a309211c29c2e475f87a9399be92ef/src/lib/url.js#L34-L41

(This is a separate issue from #64.)

ido50 commented 3 years ago

I second this. The amount of times I accidentally ran Google searches with sensitive information from my clipboard is insane.