Skip to content

Commit 4101c7e

Browse files
committed
chore: toggle fullscreen with F keys
1 parent 016035a commit 4101c7e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/electron.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,14 @@ function createWindow() {
4343
win.maximize();
4444

4545
win.webContents.on('before-input-event', (event, input) => {
46-
if (input.control && input.shift && input.key.toLowerCase() === 'i') {
46+
if (input.type === 'keyUp') return;
47+
if (input.control && input.shift && input.key.toLowerCase() === 'i' || input.key === 'F12') {
4748
event.preventDefault();
4849
win.webContents.openDevTools();
4950
} else if (input.key === 'F5' || input.control && input.key.toLowerCase() === 'r') {
5051
win.reload();
52+
} else if (input.key === 'F11') {
53+
win.setFullScreen(!win.isFullScreen());
5154
}
5255
});
5356

0 commit comments

Comments
 (0)