active-window
                                
                                
                                
                                    active-window copied to clipboard
                            
                            
                            
                        how to get activeWindow one more times
I have a problem, I want to get now active window when i press some keys。so first i press key ,I can get the active window,but second press back throw stderr.toString(); this is my code : `'use strict'; const ioHook = require('iohook'); const monitor = require('active-window');
ioHook.on("keydown", event => { console.log(event); /* You get object like this { type: 'mousemove', x: 700, y: 400 } */ if (event.keycode === 67 && event.rawcode === 120) { monitor.getActiveWindow(() => { try { console.log("App: " + window.app); console.log("Title: " + window.title); }catch(err) { console.log(err); } }); } });
//Register and start hook ioHook.start();
`
the errors :
throw stderr.toString();
I have this problem as well and now I've changed to active-win, it can also give me the window without using a callback.