Anyone have any examples of listening to (and triggering-from) keystrokes? I'd like to page through a pageComponent using the up and down arrow keys
document.addEventListener 'keydown', (event, layer) -> print event.which
Cool! this will give you the character that was pressed:
document.addEventListener 'keydown', (event, layer) -> print String.fromCharCode(event.keyCode)
Here's a sample project: http://share.framerjs.com/psnvk2t41sri/ happy typing!
Stephen & Andrew thanks fellas. Much appreciated