vimium icon indicating copy to clipboard operation
vimium copied to clipboard

how can i bind c-w?

Open 0eti opened this issue 1 year ago • 2 comments

Describe the bug

i want to bind c-w to scrolltotop but c-w is close tab in chrome orginal short cut so it doesn't work. how do i solve it?

To Reproduce

Steps to reproduce the behavior:

  1. bind c-w to scrolltotop

Browser and Vimium version Chrome | 126.0.6478.127 OS | Windows 11 Version 23H2 (Build 22631.3880) Vimium | 2.1.2

0eti avatar Jul 17 '24 17:07 0eti

As far as I know, addons aren't allowed to rebind browser built in shortcuts. On Mac you can change Chrome shortcuts so that might work. Otherwise, there doesn't seem to be a native way to change or unmap Chrome's defaults. So the only way you might be able to do this is by trying one of the extensions to remap browser shortcuts. I saw someone recommend this https://chromewebstore.google.com/detail/autocontrol-keyboard-shor/lkaihdpfpifdlgoapbfocpmekbokmcfd and it might work for that, but I can't endorse it. A normal extension that uses JS to "change" shortcuts definitely won't work because it's not actually altering the Chrome defaults, it's just adding a new one into the js of the page.

I hope this helps. afaik what you are asking is somewhat unsupported.

UncleSnail avatar Jul 19 '24 20:07 UncleSnail

Just reinforcing @UncleSnail's point as the Vimium wiki says the same in the FAQ section Why can't I remap Ctrl-N and similar keys on Linux and Windows?

astr0n0mer avatar Jul 24 '24 06:07 astr0n0mer