Steps to reproduce:
Visit this page. It is a JSFiddle consisting entirely of
window.onkeydown = function(e) { e.preventDefault(); };
Click inside the gray area, under the white top bar, to give focus to the main area.
Press Ctrl+Z to enter Pass Through mode.
Press Esc. This will fail, because the key is intercepted by the JavaScript and never sent to Pentadactyl.
This is easy to mitigate in the example by clicking on the top bar to transfer focus away from the area containing the onkeydown
, allowing Escape to get through and exit Pass Through mode. However, I'm working with a site that intercepts all key presses (with preventDefault
) via window.onkeydown
, so there's nowhere to transfer the focus away to.
The only solution I've been able to find is to create a new tab and then close it (d
). However, this requires use of the mouse (as the t
shortcut no longer works because we're in Pass Through mode), and it's a hacky workaround.
Is there any way to exit Pass Through mode with only the keyboard, on a site that intercepts all key presses?