lusakasa / saka-key

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

Key command to focus omnibar #36

Open AndrewBelt opened 7 years ago

AndrewBelt commented 7 years ago

Opening a new tab focuses the omnibar for you, but there are cases when I do not want to open a new tab but replace the current tab with a page. The "F6" key does exactly this in vanilla Firefox.

eejdoowad commented 7 years ago

Unfortunately, there is no API for focusing/defocusing the Omnibar. This is part of why other similar extensions, like cVim, Vimium, and Surfing Keys, implement their own Omnibar extension.

I'm working on something similar (and I hope far better). Chrome users can check it out at https://chrome.google.com/webstore/detail/saka/nbdfpcokndmapcollfpjdpjlabnibjdi. I'm swamped with bug fixes and other projects, so I haven't had a chance to get the Firefox version to a reasonable state, but this is the VERY EARLY Firefox alpha.

wshanks commented 7 years ago

I don't know if this is any more convenient for you, but Ctrl+l also works for focusing the omnibar.

eejdoowad commented 7 years ago

CTRL+L is great. I just wish there was a hotkey to defocus the Omnibar.

AndrewBelt commented 7 years ago

Thanks for the Ctrl+l tip. You can hit Tab to defocus the omnibar and focus something else, which might be the page. A crappy workaround, but it's better than grabbing your mouse.

wshanks commented 7 years ago

To give focus back to Saka Key, I have to hit tab about seven times because first it focus the search bar, then it cycles through all the different search providers, and then it goes back to the page. Shift+Tab is a little better -- only three times -- but it's still annoying. Maybe one day we can have https://bugzilla.mozilla.org/show_bug.cgi?id=1215061

cougarten commented 7 years ago

@willsALMANJ maybe you can live without the searchbar? I removed it and simply set duckduckgo to my default search and search with the omnibar itself (if it's no URL it searches). If I need other engines there usually is a DDG bang command (e.g. !g somewhere in the search term for google.com). If there is non, I set up a search keyword bookmark thing and do e.g. g searchterm for google if I set my keyword to g.

Thank you for the late pentadactyl builds btw :)

wshanks commented 7 years ago

@cougarten Removing the searchbox is a good idea. I had thought about it but not tried it (since moving on from Pentadactyl I have tried to stay closer to the default Firefox experience). Also, I realized that the searchbox only adds one Tab press if it is empty. For me, it usually wasn't empty because it had something like "jjkk" from me trying to scroll after tabbing out of the omnibar.

One other nice thing about hiding the searchbox and using Ctrl+l: this makes Ctrl+l Tab an escape sequence for exiting pass key mode which partly address #38.

I use !g sometimes in DDG. I should try others more. I tried the search keywords when I first moved away from Pentadactyl but I was too disappointed at the time by how much worse the experience was compared to Pentadactyl (couldn't tab complete the engine names or get customized completions)