Surfingkeys
Surfingkeys copied to clipboard
Search selected/entered via omnibar on background
Sometimes it feels natural to accumulate links in the background to read them later.
Solves #1757
Functionality is ready but I want to discuss defaults and some refactorings.
-
What should be the default key for searching in the background? I choose
;
because it's unlikely to someone assignsearchAlias
to;
.b
for "background" is occupied by default and even if the user changes it'll probably clash with Baidu or Bing. -
Should we refactor? I think it's sufficiently hard to grasp which line adds what functionality in the current state. For
o
+alias
likeog
for "Open Google"Control + Enter
opens in background so one Omnibar is enough. But other parts have some repetitions, we can use some kind of builder, but to use a builder we need to changesearchSelectedWith
to something likesearchSelectedWith(URL: string, options: {})
Hi @eugercek ,
great work! regarding the defaults shortcut, I would prefer it to be accessible by the left hand. Frequently, we will be using the mouse to select some text before intending to background search. It will be faster to immediately trigger using the left hand.
Which letter key to use is tricky, because most seems to be used up by others.
Another option is to still use "s". But overload it. "sg" - search google in foreground. "sG" - search google in background.
I really like the idea above. Though I prefer the default to flipped. I search in background much more frequently.
"sG" - search google in foreground. "sg" - search google in background.
Hi,
I would prefer it to be accessible by the left hand
Excellent point!
"sG" - search google in background.
sG
is used for "Open OmniBar with selected text and search it new tab (not in the background)"
So we need to find another left-hand key. Using an alphabetic character is not OK since people can bind it to a search engine. Tilde is far from home row, but it's the only easy key to press with left hand.
So we could use both ;
and ` for background.
I like the idea above. However, I prefer the default to flipped. I search in the background much more frequently.
I agree, but I don't want to break people's workflow; after this has merged, I'll use the below function to swap those.
function swapKeys(key1, key2, mode="map", mode_remove="unmap") {
api[mode]("temp", key1);
api[mode](key1, key2);
api[mode](key2, key1);
api[mode_remove]("temp");
}
So we could use both
;
and ` for background.
How about q
?
q
is ok for ergonomics, but removing q
as a search alias is a bit problematic. Can we bind the space key?
Seems like this is still not implemented.
Totally forgot this, will look at weekend.