Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Ignore ESC macOS
// ==UserScript==
// @name Keep Full Screen
// @namespace
// @description Prevents Escape key from leaving full screen.
// @include http://*
// @include https://*
// ==/UserScript==
document.documentElement.onkeydown = (event) => {
if (event.keyCode == 27) event.preventDefault();
console.log("Keep Full Screen");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment