Reputation: 9905
How can i enable the "Press ESC to exit full screen mode message" in electron while i'm in fullscreen in an iframe?
Observation: Same iframe with same options in Chrome shows the message, but electron doesn't.
Upvotes: 0
Views: 1080
Reputation: 302
The easiest way to do this would be through some simple window controlling with the remote
module.
const remote = require("electron").remote;
document.addEventListener("keydown", event => {
switch (event.key) {
case "Escape":
if (remote.getCurrentWindow().isFullScreen()) {
remote.getCurrentWindow().setFullScreen(false);
}
break;
}
});
Code and original answer here by Zen.
Upvotes: 1