Extensions captures keyboard shortcuts from inside a Web Assembly app.
Describe the bug
When using a web assembly application (example: The web based game editor of the Godot Engine https://editor.godotengine.org/releases/latest/) it captures all keypresses as Vimium shortcuts.
To Reproduce
- Go to https://editor.godotengine.org/releases/latest/
- Press "Start Godot editor"
- Press "NewProject"
- Enter "Hello" as the project name.
Browser, OS and Vimium C versions
- Browser name: Chrome
- Browser version: 102.0.5005.115
- Vimium C version: 1.98.3
- OS name and version: Windows 1
This means such pages don't use hidden editable text boxes to capture keyboard events, and then Vimium C can not learn it should not grab keyboard events as usual - in the URL above, the page draw all UI components using <canvas> by itself.
You may open Vimium C Options, configure Excluded URLs and keys to make Vimium C disable itself on some URLs.
Or try the command named enterInsertMode (mapped to i by default) when you find Vimium C grabs keys unexpectedly. Ane <esc> can exit a default enterInsertMode. If you write map xxx enterInsertMode key="<a-?>", then only <a-?> (Alt+Shift+/) can exit it.
There're some ways to turn on/off Vimium C easily using a same key, and please see https://github.com/gdh1995/vimium-c/wiki/Enable-or-Disable-all-frames-by-a-shortcut .
Can you give me an example of how such a website that runs completely inside a <canvas> element could make use of a hidden textbox to avoid that behaviour of Vimium?
- Create an
<input type=text> - make the input
opacity: 0orleft: 10000px - make the input focused, and listen its
keydownandkeyupevents to callevent.preventDefault()on almost all keys - then Vimium C will know an input is focused so it should not apply key mappings, and the page itself can receive all keys
Some pages may use an <iframe> with <body contenteditable=true> to grab keyboard focus, which is even stronger then the above method.
Any new question or suggestion about this?