gdh1995 / vimium-c

A keyboard shortcut browser extension for keyboard-based navigation and tab operations with an advanced omnibar
https://chrome.google.com/webstore/detail/vimium-c/hfjbmagddngcpeloejdejnfgbamkjaeg
Other
3.38k stars 253 forks source link

Unresolvable shortcut conflict with other extension #1010

Open ZerdoX-x opened 1 year ago

ZerdoX-x commented 1 year ago

Hi :) Thank you for this awesome plugin. But I have an issue with conflicting shortcut from other extension. So first of all I am using colemak layout if it does matter.

Problem

  1. I want to use Alt+I shortcut in order to navigate through tabs in sidebery extension.
  2. After I press Alt+I Vimium intercepts shortcut and behaves like I pressed I - goes into insert mode.
  3. Only when I press Alt+I once again, but in insert mode already, sidebery works as expected and Vimium passes through this shortcut.

Note about colemak: physically I am pressing L button.

What I have tried

  1. Setting custom key mappings:
    map l reset
    map <alt-l> reset
    map <alt-i> reset
  2. unmap doesn't work as nothing actually mapped on alt-i
  3. Setting "Ignore layout when holding down Alt (Option, ⌥) key"
  4. And all methods above combined

Browser and OS

I would really like to hear from you @gdh1995 as I think this is a bug. Why Vimium doesn't ignore Alt+I when it doesn't have such key mapping?

gdh1995 commented 1 year ago

Sounds like your said Alt+I was treated as a simple I key (an i character) by Vimium C.

You may try unmap i to disable the default shortcut of entering a global insert mode.

Please test what a webpage can receive when you press this shortcut on https://gdh1995.cn/vimium-c/keyboard-test.html , and a snapshot may help a lot.

ZerdoX-x commented 1 year ago

Sounds like your said Alt+I was treated as a simple I key (an i character) by Vimium C.

Yes. Alt+i for Vimium is the same as just i. This breaks ability to map shortcuts that interfere any button that Vimium has binding on. (Alt+v triggers visual mode, etc)

You may try unmap i to disable the default shortcut of entering a global insert mode.

I know that I can unmap i but I want to use default insert mode shortcut. I want Vimium to ignore shortcuts when I am holding Alt, because there is no shortcut like Alt+I.

Please test what a webpage can receive when you press this shortcut on https://gdh1995.cn/vimium-c/keyboard-test.html , and a snapshot may help a lot.

I will record screen later and will output all my keyboard presses so you could clearly see what is happening.

gdh1995 commented 9 months ago

Hello, sorry for this late response, but I think I've found the root cause.

Do you have enabled the privacy.resistFingerprinting flag on about:config? The flag is designed by Firefox to protect your privacy, while it will also hide the status of Alt key - then it prevents Vimium C from telling <a-i> from i.

There seems no way for a web-extension to bypass it. I'm not sure how "sidebery" did it.

ZerdoX-x commented 9 months ago

Hm... Yes, I do have. I'll try to investigate into it later. For now I just disabled all vimium features except links navigation.