shortcutManage.ts 278 B

12345678910
  1. import { globalShortcut } from "electron";
  2. import { toggleDevTools } from "./windowManage";
  3. export const registerShortcuts = () => {
  4. globalShortcut.register("CmdOrCtrl+F12", toggleDevTools);
  5. };
  6. export const unregisterShortcuts = () => {
  7. globalShortcut.unregisterAll();
  8. };