How to disable keyboard shortcuts 'Alt + F4' in Electron

I am facing this problem from last 1 week, that i am not able to disable or change the working of these keyboard shotcuts in Electron.

ctrl + alt + delete’ and ’ alt + F4

Below I have mentioned the 2 ways to do that, but it not works. Please help !


const { app, BrowserWindow, globalShortcut, path, url} = require(‘electron’)

app.on(‘ready’, () => {
const ret = globalShortcut.register(‘alt+f4’, function () {
win.show()
})
})


{
role: ‘help’,
submenu: [
{
label: ‘Reload’, accelerator: ‘Alt + F4’,
click: function (item, focusedWindow) {
focusedWindow.reload();
}
}
]
}


Please help me :slight_smile: