globalShortcut.register(shortcut, () => {
if (!isKeyPressed) {
isKeyPressed = true;
console.log("pressed");
ipcMain.handleOnce('electronAPI', "keyPressHandler")
}
});
// Обработка события отпускания клавиши
globalShortcut.register(shortcut, () => {
isKeyPressed = false;
console.log("unpressed");
ipcMain.handleOnce('electronAPI', "keyPressHandler")
});