From 0f4f6ca2d053481c9e2fe616dda52e430675cf10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=B6=E5=BF=97=E8=B6=85?= <651778286@qq.com> Date: Fri, 24 Dec 2021 10:49:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B1=8F=E8=94=BD=20F11=20=E8=BF=9B=E5=85=A5/?= =?UTF-8?q?=E9=80=80=E5=87=BA=E5=85=A8=E5=B1=8F=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/app.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/app.ts b/src/main/app.ts index af9239c..7358259 100644 --- a/src/main/app.ts +++ b/src/main/app.ts @@ -1,4 +1,4 @@ -import { app, screen, BrowserWindow } from 'electron' +import { app, screen, globalShortcut, BrowserWindow } from 'electron' import {join} from "path"; import './load-serialport' @@ -35,8 +35,10 @@ function launch() { createWindow('satellite-info-monitor-platform', displays[1]) createWindow('satellite-signal-monitor-platform', displays[2]) createWindow('satellite-state-monitor-platform', displays[3]) - } + + // 屏蔽 F11 进入/退出全屏功能 + globalShortcut.register('F11', () => {return}) } app.whenReady().then(launch) @@ -51,4 +53,4 @@ app.on('activate', () => { if (BrowserWindow.getAllWindows().length === 0) { launch() } -}) \ No newline at end of file +})