Keyboard events in atom-shell

Tags: electron
By : d--b

I am trying to use atom-shell, but I don't understand how the DOM events differ from a normal browser. I can't find doc about it either.

If I add:

 document.onkeydown = function() { alert('...'); }

to index.html, it seems that atom-shell doesn't capture the event, and instead forwards the call to the terminal in which I ran atom-shell myapp.

Is there any documentation somewhere about how the DOM events work in atom-shell?

Edit: This only happens when I run atom-shell from the terminal window (in OSX). If I run the app by first starting the Atom application and dragging my app inside the drag area, then it works fine...

By : d--b

By : d--b

This video can help you solving your question :)
By: admin