const { ipcRenderer } = require('electron');

const winType = 'simple';

document.addEventListener('keydown', (e) => {
  console.log('simple');
  const oEvent = e || window.oEvent;
  const bCtrlKey = oEvent.ctrlKey;
  const bShiftKey = oEvent.shiftKey;
  const code = e.which || e.keyCode;
  const bDKey = code === 68;// d
  if (bCtrlKey && bShiftKey && bDKey) {
    ipcRenderer.send('openDevTools', winType);
  }
}, false);

window.ipcRenderer = ipcRenderer;
