Permalink
Browse files

Keyboard api says "ctrl" is equal to "control", so added that back in…

…. also, allowing regular keyup and keydown events to pass through, needed by the Events.Pseudos.Keys
  • Loading branch information...
1 parent 4e5905f commit 8ad8ee12c857f51d7f26ba4c53553099b1ecabb0 @seanmonstar committed Mar 17, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 Source/Interface/Keyboard.js
@@ -173,14 +173,14 @@ provides: [Keyboard]
Keyboard.parse = function(type, eventType, ignore){
if (ignore && ignore.contains(type.toLowerCase())) return type;
- var keys = type.toLowerCase().replace(/^(keyup|keydown):/, function($0, $1){
+ var keys = type.toLowerCase().replace(/^(keyup|keydown):?/, function($0, $1){
eventType = $1;
return '';
- });
+ }).replace('ctrl', 'control');
@arian

arian Mar 20, 2011

Shouldn't we handle this in :keys?

@seanmonstar

seanmonstar via email Mar 20, 2011

Owner
- return eventType + ':keys(' + keys + ')';
+ return eventType + (keys && ':keys(' + keys + ')');
};
Keyboard.each = function(keyboard, fn){

0 comments on commit 8ad8ee1

Please sign in to comment.