marquete/kibo

Need to click window before commands work

Closed this issue · 2 comments

Hi! Thanks for the great script!

The only problem I have is that I seem to have to click on the window before any of the keyboard calls will work. Once that happens I'm great, but I feel like I'm missing something simple at the beginning when I setup?

var k = new Kibo();
k.down('esc', function() { close() })

Thanks!

Hello there.

Could you tell me what OS and browser you are using?

From what I've been able to test, you might be having problems with the close() function call. I'm using Arch Linux and I just tested your code under the latest versions of Chromium, Opera and Firefox. Chromium and Opera close the tab with no problems, but Firefox doesn't seem to respond. However, they all behave as expected if I replace close() with something like console.log('escape attempt detected!'), i.e. I don't need to click on the window for the keyboard events to respond.

I hope this helps. Let me know if there's anything else I can do for you. Cheers!

Closing due to inactivity.