-
Notifications
You must be signed in to change notification settings - Fork 244
Hitting escape exits full screen #110
Copy link
Copy link
Open
Labels
Description
As a person pretty much exclusively using safari in full/split screen mode I find myself constantly exiting fullscreen by accident when using vimari, for instance if I want to return to normal mode after writing a comment like this to hit the submit key from links hint mode.
This can be avoided by preventing default behaviour through an event listener.
Rough example:
function disable_esc_exit(window){
const ESC_KEY = 27;
const KEYPRESS_EVENT = "keypress";
window.addEventListener(KEYPRESS_EVENT,
event => event.keyCode === ESC_KEY && event.preventDefault()
);
}
...
disable_esc_exit(window);Reactions are currently unavailable