监听全局键盘
'use strict';constioHook=require('iohook');ioHook.on('keydown',event=>{console.log(event);// { type: 'mousemove', x: 700, y: 400 }});// Register and start hookioHook.start();// Alternatively, pass true to start in DEBUG mode.ioHook.start(true);监听全局鼠标
'use strict';constioHook=require('iohook');ioHook.on('mousemove',event=>{console.log(event);// { type: 'mousemove', x: 700, y: 400 }});// Register and start hookioHook.start();// Alternatively, pass true to start in DEBUG mode.ioHook.start(true);
监听全局键盘
监听全局鼠标