Hacker News new | ask | show | jobs
by bovine3dom 834 days ago
FWIW, the / search isn't part of Tridactyl but we do inject some code that frees up / from most websites so Firefox can use it.

It's possible to write your own user script to do it (you just need to add a keypress event handler that does preventDefault() and maybe stopPropagation()) with no need for Tridactyl :)

2 comments

Good to know, thank you. Maybe non-Trydactyl users should check if / is hijacked along with Ctrl-F, Ctrl-G, and F3.

And I'll take the opportunity to say thank you for Tridactyl! Have a great weekend!

But it still doesn't seem to work on GitHub, did you whitelist GitHub for the preventDefault or is GitHub just a bit extra when it comes to hijacking keybinds?
It works sometimes on GitHub, it's just a bit extra as you said.

GitHub is what annoyed me enough to make the feature in the first place. It used to work reliably but they made it worse :(

Ah bummers, but nonetheless thanks for implementing this feature!

EDIT: I just took a look at GitHub's source code, and they mentioned a setting to turn off these shortcuts, and it really exists!! Under https://github.com/settings/accessibility one can turn off, all "Character keys" which means shortcuts without a modifier. I've never used them, so I just disabled it, and now forward slash always opens the Firefox search :0

https://docs.github.com/en/get-started/accessibility/keyboar...

I had no idea, thanks for sharing!