Does ember have a way to allow ember components to capture/listen to global keypress events without having to set focus (as described by the attached links)?
Is there an elegant way of doing this in the latest version on Ember ?
Global keyDown/keyPress events in EmberJS without having to set focus
FYI best way to implement this is to use the Mousetrap.js http://craig.is/killing/mice
Ember CLI instructions
bower install --save mousestrap
Add /* global Mousetrap */ to the top of the file you want to use mouse trap in (which in my case was a custom component
Example usage:
didInsertElement: function() {
Mousetrap.bind('right', function() {
alert('right direction arrow clicked');
});
}