News for hackers. Stuff that matters.
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