philc / vimium

The hacker's browser.
https://chrome.google.com/webstore/detail/vimium/dbepggeogbaibhgnhhndojpepiihcmeb
MIT License
23.02k stars 2.47k forks source link

Number keys don't work for web script's `keydown` event, even if Vimium has been "unmapAll" #4233

Open garywill opened 1 year ago

garywill commented 1 year ago

Describe the bug I set Vimium to "unmapAll". Number keys can't work on web.

To Reproduce Steps to reproduce the behavior:

  1. Install Vimium-FF 1.67.6 on Firefox 110
  2. Open Vimium options. Fill "unmapAll" into "Custom key mappings"
  3. Open this html file in Firefox:

    <html >
      <head>
        <title>key test</title>
        <script>
            document.addEventListener('keydown', function(evt) {
                console.log(evt);
            });
        </script>
      </head>
      <body>
        key test. show in console
      </body>
    </html>
    
  4. Press F12 to open console
  5. Focus the web page. Press some keys. You'll find keydown event can't receive 1-9 number key event
gdh1995 commented 1 year ago

Yes unmapAll doesn't affect 0-9, but there' still a chance to exclude them - you may add 123456789 as Pass Keys of an exclusion rule, like this: image

And then click Save Options and refresh pages to make it work.