* Pass 'key' object to actions & submit form events

This commit is contained in:
Bryan Ashby 2015-08-13 16:05:17 -06:00
parent 08bebb560d
commit 6d49e5e55f
5 changed files with 56 additions and 14 deletions

View file

@ -254,9 +254,9 @@ View.prototype.onKeyPress = function(ch, key) {
assert(this.specialKeyMap, 'No special key map defined');
if(this.isKeyMapped('accept', key.name)) {
this.emit('action', 'accept');
this.emit('action', 'accept', key);
} else if(this.isKeyMapped('next', key.name)) {
this.emit('action', 'next');
this.emit('action', 'next', key);
}
}