aboutsummaryrefslogtreecommitdiff
path: root/views/script/client_fullscreen.js
blob: 80d745c7f47b0b1a228dcf4164e844fc998fb2a6 (plain)
1
2
3
4
5
6
7
8
9
document.addEventListener('keydown', function(e) {
    if (e.key === "F1" || e.key === "F10" || e.key === "F11") { // F11/F1/F10
        if (!require('@electron/remote').getCurrentWindow().fullScreen && require('@electron/remote').getCurrentWindow().fullScreenable) {
            require('@electron/remote').getCurrentWindow().setFullScreen(true);
        } else {
            require('@electron/remote').getCurrentWindow().setFullScreen(false);
        }
    }
})