0
votes

How can i enable the "Press ESC to exit full screen mode message" in electron while i'm in fullscreen in an iframe?

2019-11-06_13-01-16

Observation: Same iframe with same options in Chrome shows the message, but electron doesn't.

1

1 Answers

1
votes

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.