屏蔽 F11 进入/退出全屏功能

master
叶志超 2021-12-24 10:53:41 +08:00
parent 6ed9ebc1f6
commit c0c41f8fa5
2 changed files with 8 additions and 3 deletions

View File

@ -2,7 +2,7 @@
"name": "global-navigation-satellite-system", "name": "global-navigation-satellite-system",
"description": "global-navigation-satellite-system", "description": "global-navigation-satellite-system",
"author": "hwasmart", "author": "hwasmart",
"version": "5.5.6", "version": "5.5.7",
"main": "dist/main/app.js", "main": "dist/main/app.js",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",

View File

@ -1,4 +1,4 @@
import { app, BrowserWindow } from 'electron' import { app, globalShortcut, BrowserWindow } from 'electron'
import { join } from "path" import { join } from "path"
function createWindow() { function createWindow() {
@ -19,7 +19,12 @@ function createWindow() {
} }
} }
app.whenReady().then(createWindow) app.whenReady().then(() => {
createWindow()
// 屏蔽 F11 进入/退出全屏功能
globalShortcut.register('F11', () => {return})
})
app.on('window-all-closed', () => { app.on('window-all-closed', () => {
if (process.platform !== 'darwin') { if (process.platform !== 'darwin') {