Skip to content

Commit

Permalink
Refactoring.
Browse files Browse the repository at this point in the history
  • Loading branch information
tarao committed Mar 25, 2010
1 parent 4ab29db commit 5ff5dad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 1 addition & 3 deletions app.js
Expand Up @@ -93,9 +93,7 @@ if (typeof LambdaJS.App == 'undefined') LambdaJS.App = {};
}
return true;
}, self.cont);
}, function(evnt) {
return false;
}, function(evnt) {
}, null, function(evnt) {
if ((evnt.charCode || evnt.keyCode) == 220) {
UI.insertText(self.console.input, '\u03bb');
return true;
Expand Down
5 changes: 3 additions & 2 deletions ui.js
Expand Up @@ -400,7 +400,8 @@ if (typeof UI == 'undefined') var UI = {};
self.reposition();
var history = self.history.clone();
new Observer(self.input, 'onkeyup', function(e) {
switch (e.event.charCode || e.event.keyCode) {
var evnt = e.event;
switch (evnt.charCode || evnt.keyCode) {
case 13: // Enter
var text = self.input.value;
self.history.push(text);
Expand All @@ -410,7 +411,7 @@ if (typeof UI == 'undefined') var UI = {};
setTimeout(function(){ self.command(text); }, 0);
break;
default:
if (!self.keyup(e.event)) return;
if (!self.keyup(evnt)) return;
}
e.stop();
});
Expand Down

0 comments on commit 5ff5dad

Please sign in to comment.