globalShortcut stops working after switching from ipc to ipcMain & ipcRenderer


#1

Reference:

  1. https://medium.com/developers-writing/building-a-desktop-application-with-electron-204203eeb658#.w1gam0oa6

  2. http://electron.atom.io/blog/2015/11/17/electron-api-changes

I have followed the [1] tutorial and change the ipc usages based on [2]. Here is what I have done:

in main.js
replace var ipc = require(‘ipc’); with var ipcMain = require(‘electron’).ipcMain

in index.js
replace var ipc = require(‘ipc’); with var ipcRenderer = require(‘electron’).ipcRenderer

Issues:
After the replacement, the globalShortcut stops working. What may be the issue?

Thank you