← Experiments

vimium-trap(archived)

Keep Vimium and friends from eating your web game's keyboard input.

npm install vimium-trap

Vim-style browser extensions treat a focused <canvas> like any other page and intercept hjkl, f, x, and friends. Page-level preventDefault doesn’t help — content scripts see events first. Exclusion lists need per-player config and break on itch CDN iframe domains.

trapKeys(canvas) is the tested folk fix: make the focused element look editable so extensions enter insert-mode passthrough. Used in EndWise and CELLAGA — Vimium, Vimium C, Surfingkeys, Tridactyl, zero config.