Solved Stop websites from reassigning Vivaldi shortcuts
-
Many websites have javascript that overrides browser shortcuts that one might have assigned, or even override typical shortcuts in order to provide equivalent functionality β for example, some websites override Ctrl + F in order to present their own (usually inferior and annoying) in-page search functionality, while others override Ctrl + PageUp/Down (which I use for switching tabs) for a shorter PageUp/Down.
Would be nice if Vivaldi could offer the option to not allow configured keyboard shortcuts to be overriden by websitesβ javascript.
//MODEDIT: see also: Prevent websites from disabling the default context menu
-
Vivaldi 7.2 now offers a way to prevent sites stealing shortcuts: https://vivaldi.com/blog/vivaldi-on-desktop-7-2/
-
I believe they are aware of this, it should be in the pipeline at least.
See e.g. (VB-60066): YouTube messed up by single key shortcuts (short explaination: when pressing a number on YT, the position of the video playing is changed).
The Vivaldi Team responded to me with "The ability to select which keyboard shortcuts will get priority in cases like this is in our pipeline of features to implement."
-
I second this. I've set
T
to open a new tab, but on YouTube it toggles Cinema mode. -
Hello,
same here, on https://discord.com/app, once logged in, pressing F1 doesn't trigger my Vivaldi shortcut but opens discord help in a new tab (https://support.discord.com/hc/en-us)
How can we prevent websites to take over our shortcut keys ?
I had a look online and it seems to be a recurrent issue for several users.
Apparently on Firefox they did it right, they have this permission per website:
Tools > Page Info > Permissions > Override Keyboard ShortcutsI thought if Firefox has it, then of course Vivaldi has it and it would be implemented even better
but apparently noOn Vivaldi, I couldn't find anything beside disabling javascript... which doesn't really help as the website doesn't even load after that.
How do you deal with this kind of issue ?
-
Absolutely support this request.
Firefox already supports it as described here:
https://superuser.com/questions/168087/how-to-forbid-keyboard-shortcut-stealing-by-websites-in-firefoxPlease add this to our favorite browser - the browser that keeps the user in control.
-
If they do this, they should add Vimium-like insert mode shortcut to send shortcuts to the webpage temporarily, and exclusion rules to permanently enable sending some or all shortcuts to the page, in order not to break site functionality β some sites have useful shortcuts.
I currently use Vimium to basically achieve this feature request. Vimium prevents websites from overriding the shortcut, but flexible enough to allow sending through some keys temporarily or permanently. E.g. on Youtube I want to use
jkl
keys for website's own functionality, so they are on the exclude list forhttps://www.youtube.com/*
, but I use other shortcuts likec
rarely, so they normally perform their Vivaldi/Vimium functions, and when I want to sendc
shortcut to Youtube, I pressi
first to enter insert mode. (It even has a normal mode shortcut to disable website exclusions temporarily, e.g. usejkl
keys on Youtube for their normal Vimium functions.) This works well enough, but now perfect as not all Vivaldi commands have Vimium counterparts since extensions' access to things is limited; and some things are buggy specifically on Vivaldi, e.g. if I create a new tab with Vimium'st
shortcut, the address bar is not focused due to a bug in Vivaldi so I prefer Vivaldi's single-keyt
shortcut, which does allow websites to override it. But even if this feature request is implemented, and implemented in a Vimium-like flexible manner so I have no need for Vimium for most shortctus, I would keep the extension around, as it has additional functionality like link hints, find mode with regex, better working next page function than Vivaldi's "Fast Forward", additional commands not yet available on Vivaldi like "Go up the URL hierarchy", etc.Currently Vivaldi has a "Disable Keyboard Shortcuts" shortcut, which might work similar to Vimium's "insert mode", but isn't as flexible. On Vimium, I can enter insert mode on a page, which then gets the shortcuts, but other tabs continue to work normally. With Vivaldi's "Disable Keyboard Shortcuts", everything is disabled everywhere, so I can't even Ctrl+Tab away from the tab, so it's only useful for the process of "Disable Keyboard Shortcuts -> Type the one shortcut to be sent to the page -> Reenable Keyboard Shortcuts". As for the exclusion rules functionality I mentioned, something like the Firefox permission mentioned above would roughly work, again not as flexibly as Vimium's allow certain keys on certain websites model.
-
Should have been Site Settings option by default.
-
-
As a recent Vivaldi convert, this might be the one thing that would make me switch back to another browser. Having "cmd + t" hijacked by a webpage is frustrating.
-
I just ran into this again with a webpage I have to use regularly hijacking CTRL+F and replacing it with a terrible search dialog that is riddled with problems. I feel like some shortcuts shouldn't be allowed to be hidden or modified by the page.
-
@syplex The devs agree with you, but this is a REALLY gnarly problem to untangle.
-
Any update on this? Encountering a few sites that override CTRL+F. Would be a great setting to be able to disable this.
-
My primary use case is occasions when I want to navigate away from a "greedy tab" temporarily, but it's stopping me either ctrl-tabbing or ctrl-t-ing away.
In this situation, I don't need a fully configurable shortcut-precedence thing, I could do with just having a shortcut that means (preferably) "give focus to Vivaldi itself, until I click back on the active page", or, (not quite as good) "the NEXT shortcut is meant for Vivaldi, don't pass it to the page".
Obviously this one particular shortcut would have to be "never-stealable". Perhaps you'd get an alert if a website tried to reassign it, so you'd know you might be missing something.
It would be nice if clicking in an empty part of the menu bar also activated "Vivaldi focus" mode (and you could return to "page focus" by clicking back anywhere in the page).
-
Hey all, i had the same issue and created a userscript to prevent Discourse websites from hijacking
Ctrl+F
andCmd+F
.
It works for me (i only tested in Vivaldi on macOS), so perhaps it is useful to some of you too;- Install a userscript extension like Violentmonkey or Tampermonkey
- Install the userscript: https://gist.github.com/notDavid/527feab96bfc27ee5d1df93a82ca3584
The script can quite easily be adapted to add different keyboard shortcuts...
-
-
I would love if you could specify which websites are allowed to use certain shortcuts, as described by @debiedowner
@debiedowner said in Stop websites from reassigning Vivaldi shortcuts:
If they do this, they should add Vimium-like insert mode shortcut to send shortcuts to the webpage temporarily, and exclusion rules to permanently enable sending some or all shortcuts to the page, in order not to break site functionality β some sites have useful shortcuts.
-
@tutanchamun said in Stop websites from reassigning Vivaldi shortcuts:
Hey all, i had the same issue and created a userscript to prevent Discourse websites from hijacking
Ctrl+F
andCmd+F
.
It works for me (i only tested in Vivaldi on macOS), so perhaps it is useful to some of you too;- Install a userscript extension like Violentmonkey or Tampermonkey
- Install the userscript: https://gist.github.com/notDavid/527feab96bfc27ee5d1df93a82ca3584
The script can quite easily be adapted to add different keyboard shortcuts...
Oh, that's a good idea, thanks! Didn't realise that these were simple events dispatched on the page.
-
Yes, please! This is so annoying!
@jumpsq said in Stop websites from reassigning Vivaldi shortcuts:
The Vivaldi Team responded to me with "The ability to select which keyboard shortcuts will get priority in cases like this is in our pipeline of features to implement."
I hope it's still in the pipeline.
I also like the idea of an insert mode, as described in this post
-
@tutanchamun said in Stop websites from reassigning Vivaldi shortcuts:
Hey all, i had the same issue and created a userscript to prevent Discourse websites from hijacking
Ctrl+F
andCmd+F
.
It works for me (i only tested in Vivaldi on macOS), so perhaps it is useful to some of you too;- Install a userscript extension like Violentmonkey or Tampermonkey
- Install the userscript: https://gist.github.com/notDavid/527feab96bfc27ee5d1df93a82ca3584
The script can quite easily be adapted to add different keyboard shortcuts...
This is an absolutely excellent workaround. I think implementing this to stop Google Sheets from hijacking basic navigation controls (for me, Ctrl with any of PgUp, PgDn, or number keys, though I also disabled all usage of Alt+anything so I can access menus, and I'm about to revert Ctrl-R so it reloads like a page should) has probably just permanently dropped my diastolic by ten points!
While it would be nice to have this as a core feature, right now I'm sated so long as tampermonkey transfers scripts properly via Vivaldi's browser sync implementation.
-
I would love for a setting to "prefer vivaldi shortcuts" that prioritizes Vivaldi over all websites. This could be opt-in if the team prefers the current behavior.
The next level would be checking "prefer Vivaldi" on specific shortucts.
The most bothersome one for me is cmd + shift + t is overridden by gmail (a rather popular website overriding a rather popular shortcut). I need to click a different tab first and then use the shortcut to re-open a closed tab.
I'm unfamiliar with any other browser that prioritizes that shortcut for websites over the browser ones (with no setting to disable)