akhodakivskiy / VimFx

Vim keyboard shortcuts for Firefox
https://addons.mozilla.org/firefox/addon/vimfx
Other
1.42k stars 174 forks source link

VimFx doesn't see Sidebery #998

Closed demostanis closed 1 year ago

demostanis commented 1 year ago

It's almost impossible to use Sidebery with the keyboard, since every key press is caught by VimFx, and handled as if they were pressed on the webpage, instead of on Sidebery. For example, pressing Ctrl+F on Sidebery will pop up the search box on the active webpage.

girst commented 1 year ago

On Tue, Oct 03, 2023 at 07:04:23AM -0700, demostanis wrote:

It's almost impossible to use Sidebery with the keyboard, since every key press is caught by VimFx, and handled as if they were pressed on the webpage, instead of on Sidebery.

this is just how vimfx works. unlike webextensions, vimfx has control of the keyboard even if the webpage isn't focused within the browser. if you want to use shortcut keys for other addons, make sure to undefine them from vimfx (press <?>, click on the key binding to modify, then clear the corresponding text field). to quickly disable vimfx temporarily, press , to reenable .

For example, pressing Ctrl+F on Sidebery will pop up the search box on the active webpage.

even with vimfx disabled, pressing ctrl+f does this. note that vimfx doesn't capture at all, it only defines (and listens for) </> by default. i tried to define as a sideberry hotkey and it is still ignored -- probably, firefox prevents overriding the built-in behaviour.

demostanis commented 1 year ago

Right, I didn't realize Sidebery was just adding its own HTML to the webpage.