aboutsummaryrefslogtreecommitdiff
path: root/views/script/core_fullscreen.js
blob: 69f9e45ea0f1e89709d0badf934daf496d1acacb (plain)
1
2
3
4
5
6
7
8
9
$(document).keydown(function(e) {
    if (e.keyCode === 122 || e.keyCode === 121 || e.keyCode === 112) { // 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);
        }
    }
})