Skip to content

Commit

Permalink
Added esc to special keycodes list.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeflynn committed Sep 16, 2015
1 parent a50f315 commit 68fd486
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions egg.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Egg.prototype.__execute = function(fn) {
// converts literal character values to keyCodes
Egg.prototype.__toCharCodes = function(keys) {
var special = {
"up": 38, "down": 40, "left": 37, "right": 39, "enter": 13, "space": 32, "ctrl": 17, "alt": 18, "tab": 9
"up": 38, "down": 40, "left": 37, "right": 39, "enter": 13, "space": 32, "ctrl": 17, "alt": 18, "tab": 9, "esc": 27
},
specialKeys = Object.keys(special);

Expand Down Expand Up @@ -125,7 +125,7 @@ Egg.prototype.handleEvent = function(e) {
this.__execute(currentEgg.fn, this);
// Call the hooks
this.hooks.forEach(this.__execute, this);

this.activeEgg = '';
}
}, this);
Expand Down
2 changes: 1 addition & 1 deletion egg.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 68fd486

Please sign in to comment.