vue 入口文件/相关组件
mounted(){ ipcRenderer.send("sendMessageEvent"); }
main 主进程
const ipc = require("electron").ipcMain; let messageEvent = null ipc.on("sendMessageEvent",(event,arg)=>{ messageEvent = event }) globalShortcut.register("Alt+F", () => { if(messageEvent) functionA(messageEvent) }); functionA(){ //XXXXX }
标签:ipc,快捷键,监听,functionA,electron,messageEvent,event From: https://www.cnblogs.com/Acicap/p/17154532.html