can-event-dom-enter
Watch for when enter keys are pressed on a DomEventTarget.
events
var domEvents = require('can-dom-events');
var enterEvent = require('can-event-dom-enter');
domEvents.addEvent(enterEvent);
var input = document.createElement('input');
function enterEventHandler() {
console.log('enter key pressed');
}
domEvents.addEventHandler(input, 'enter', enterEventHandler);
domEvents.dispatch(input, {
type: 'keyup',
keyCode: keyCode
});