News for hackers. Stuff that matters.
Re:Going mouseless by bartvk on Wednesday August 04, 2021 @06:42AM (#28059460)
Firefox has a neat trick to only search in links. Press ' (single-quote) and at the bottom, a text input field appears with the hint "Quick find (links only)". Type two or three characters will focus the link in question, just press enter to navigate.
Re:Going mouseless by globular-toast on Wednesday August 04, 2021 @06:52AM (#28059516)
This used to pair nicely with "/" which opens up the normal quick search. Unfortunately this is broken on the "modern" web as many web pages "helpfully" override the "/" key to make it go to their search box which, of course, is not at all what that key should do. There doesn't seem to be any way to stop web pages stealing this key and I've slowly learnt to use the comparatively clumsy "Ctrl+F" instead as I'm too scared to try "/" now.
Re:Going mouseless by swalladge on Wednesday August 04, 2021 @08:15AM (#28060080)
> Unfortunately this is broken on the "modern" web as many web pages "helpfully" override the "/" key

Argh this kind of thing makes me really cross. So many sites seem to feel the need to reimplement things that are already part of most browsers or even in the spec. It's not just overridng default shortcuts, but custom context/rightclick menus, custom 'links' (where clicking them runs javascript code to window.open, instead of being a real link), custom form fields that advertise 'excellent accessibility', where the fields would have been accessible anyway if they didn't decide to reimplement them, disabling text selection, overriding focus styles because the accessible styles 'look ugly' ... the 'modern' web is pain.

Anyway, this wasn't going to be a rant. My point was going to be that consistency is key. Your comment on '"Ctrl+F" instead as I'm too scared to try "/" now' really resonated with me, because I've thought about this before. I've found that a feature or shortcut is only useful if it's consistent. I can't build muscle memory or be confident using a feature if it only works 90% of the time. Or even 99%.

I've tried tridacyl and other vim-style plugins for browsers several times in the past, but always end up uninstalling them in disappointment, because it's not possible to have a consistent experience. 99% of the time it works perfectly, but then there are the handful of sites or browser specific pages (eg. about: or view-source:) where it doesn't work at all, or doesn't work consistently so one must disable it. Then muscle memory totally breaks; you need to learn two sets of keybindings for the same context, and that introduces a hesitation for every keypress, which kills speed and enjoyment.

Re:Going mouseless by i_s on Wednesday August 04, 2021 @04:18PM (#28065762)
I mostly agree, but every now and then there is actually a good reason to override/re-implement them. For example, let us say you are using virtualized components [0], so all available elements have not necessarily been rendered to the DOM (making Control-F useless).

[0] - https://github.com/bvaughn/react-virtualized

Re:Going mouseless by swalladge on Monday August 09, 2021 @06:58PM (#28123355)
I would still argue in these cases that the site shouldn't override the built-in keybinds. Maybe a custom search field/button, and maybe a custom keybind. But when I press Ctrl+F, I always want the same type of search to be initiated. Otherwise, there is no consistency, and efficiency suffers.
Re:Going mouseless by sseagull on Wednesday August 04, 2021 @08:32AM (#28060230)
I’ve always had in mind “you can’t have simplicity without consistency”. Applies to user interfaces, code structure, and APIs as well.

The more consistent something is, the less you have to remember. But it can be really hard to do things consistently for various reasons.

Re:Going mouseless by williamdclt on Wednesday August 04, 2021 @07:10AM (#28059628)
Special mentions to the github actions log output, which not only overrides ctrl+f with their own search, but have a completely broken search. Which means logs are unsearchable. Thanks a lot.
Re:Going mouseless by wging on Wednesday August 04, 2021 @03:23PM (#28065103)
Unless they're doing something wonky like hiding content that is not in the viewport (thus reimplementing scrolling), you may be able to work around that by using ctrl-f from the URL bar, denying them the opportunity to hijack ctrl-f. So ctrl-l ctrl-f.
Re:Going mouseless by MiddleEndian on Wednesday August 04, 2021 @04:08PM (#28065657)
A Firefox extension I want (or maybe I'll make one day) would be one that prevents javascript from detecting any key input while holding right ctrl or left ctrl specifically.
Re:Going mouseless by tux3 on Wednesday August 04, 2021 @07:59AM (#28059950)
Does it open the browser search if you press ^F a second time?
Re:Going mouseless by Grumbledour on Wednesday August 04, 2021 @08:40AM (#28060300)
I wasn't even aware / was for quick search. I always used Ctrl+F, which is incidentally much easier on my localized keyboard. But trying it right now, I notice that / and Ctrl+F opens different dialogs? One is called "Quick Find", the other "Find in Page", with the latter offering additional options, even though both seem to do the same thing? What is up with that?
Re:Going mouseless by bennyp101 on Wednesday August 04, 2021 @07:55AM (#28059917)
Not sure if it's a feature or not, but setting the page permissions for "Override keyboard shortcuts" still allows '/' to work, but will disable 'esc' for closing the search modal/popout - and as '/' is a keyboard shortcut, I have no idea why it still lets the site take it over
Re:Going mouseless by stronglikedan on Wednesday August 04, 2021 @03:43PM (#28065323)
Heck, MDN themselves is even guilty of this. It's maddening.

https://news.ycombinator.com/item?id=28051562

Re:Going mouseless by jbaber on Wednesday August 04, 2021 @07:59AM (#28059949)
Discovered this when some vim-like plugin failed. Realized it's about 90% of the reason I was using a vim-like plugin.
Re:Going mouseless by thomasahle on Wednesday August 04, 2021 @03:40PM (#28065284)
I just tried using it when I realized I couldn't upvote your comment as the link has no text.

Back to vimium.

Re:Going mouseless by dictum on Wednesday August 04, 2021 @04:28PM (#28065884)
Slightly more involved, but still serviceable:

- start typing the text on a link near the icon you want to click (for this comment, `thomasa`...)

- then press Shift+Tab to highlight the previous link

Re:Going mouseless by nextos on Wednesday August 04, 2021 @04:51PM (#28066142)
Vimperator provided an incredible Vim-like experience for Firefox.

Sadly, the transition to a new plugin architecture killed it and Tridactyl doesn't come even close. Some things are not possible with the new Firefox APIs, and many websites steal keyboard focus thereby ruining the Vim-like experience. Really frustrating.

Re:Going mouseless by wyclif on Wednesday August 04, 2021 @11:48PM (#28069654)
What do you think of Vimium for Chrome? There's also a Firefox port: https://addons.mozilla.org/en-GB/firefox/addon/vimium-ff/
Re:Going mouseless by tejohnso on Wednesday August 04, 2021 @04:35PM (#28065977)
I ditched my vim-like plugin when I realized I could ctrl-f, ctrl-enter to follow links in chrome.
Re:Going mouseless by manaskarekar on Wednesday August 04, 2021 @05:02PM (#28066272)
Thanks, this is awesome. I totally expect to rely on this feature after using it for a few weeks and expect Mozilla to yank it out for usability reasons.
Re:Going mouseless by janus24 on Wednesday August 04, 2021 @08:53AM (#28060431)
I'm using the US International keyboard mapping, to type ' I have to type ' + space. The goal is to add the possibility to wrote letters like é (' + e).

So this doesn't work for me and it doesn't seem possible to change the shortcut on Firefox :(

Re:Going mouseless by Macha on Wednesday August 04, 2021 @07:37PM (#28067835)
So I use a keyboard layout (Irish) from a country where this a need some people have but not frequently. There is the compose feature, but it's located in the button underneath escape (labelled ` ¬ ¦), not overloading single quote.

The one issue with that arrangement is you run into video game server admin/modding tutorials and the like and they describe pressing "~" for the console, and it's hardcoded to the keycode and doesn't consider the keymap, so it's actually looking for that button, except getting a literal ` requires a double tap of ` rather than all the UI elements telling you it's ~.

Oh and quoting code blocks in markdown can be kind of annoying. Or inline variable names that start with a letter that supports the accent.

But I think I'd take those limitations over losing single quote.

Re:Going mouseless by pge on Wednesday August 04, 2021 @09:37AM (#28060857)
ctrl-shift will switch back and forth between selected keyboards in windows, so you can keep the keyboard in ENG US most of the time (allowing you to use the ' shortcut in Firefox), and use ctrl-shift to switch to ENG INTL when needed.
Re:Going mouseless by jolmg on Wednesday August 04, 2021 @03:05PM (#28064892)
There's a variant of the US layout called altgr-intl where instead of making ' a dead key you can do RightAlt-e for é.
Re:Going mouseless by Macha on Wednesday August 04, 2021 @07:37PM (#28067846)
Is that literally the same character for both? On my layout `e leads to è whereas alt-gr+e = é. é != è in many languages.
Re:Going mouseless by jolmg on Thursday August 05, 2021 @05:08AM (#28071418)
janus24 specified "é (' + e)". That's neither ` nor è.

Not all languages that use é have a use for è.

Re:Going mouseless by nicholasjarr on Wednesday August 04, 2021 @09:59AM (#28061080)
Wow! One more reason to stick with Firefox. Thanks!
Re:Going mouseless by petepete on Wednesday August 04, 2021 @06:45PM (#28067428)
Thank you so much for this. Used it since more or less day one and never knew about this feature.
Re:Going mouseless by agumonkey on Wednesday August 04, 2021 @03:14PM (#28065003)
I so forgot about this. Incredible.
Re:Going mouseless by dagw on Wednesday August 04, 2021 @06:44AM (#28059472)
Wow, TIL. Thanks!