electron控制台打开切换
作者:互联网
-
// 控制台切换 window.addEventListener('keydown', (e) => { const { altKey, ctrlKey, keyCode } = e; console.log(keyCode, 'keyCode'); // alt + ctrl + (Command | Windows) + l if (keyCode === 123) { //获取当前窗体 const currentWindow = window.require('electron').remote.getCurrentWindow(); currentWindow && currentWindow.toggleDevTools(); e.preventDefault(); } }, false);
-
标签:const,electron,currentWindow,window,切换,控制台,keyCode 来源: https://www.cnblogs.com/fqh123/p/15942431.html