Skip to content

Commit

Permalink
use dojo.keys for key code numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuels committed Mar 25, 2012
1 parent 346d9d8 commit e5298aa
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions js/GenomeView.js
Expand Up @@ -191,15 +191,12 @@ GenomeView.prototype._behaviors = function() { return {

dojo.connect( this.locationThumbMover, "onMoveStop", this, 'thumbMoved' ),

// 16 is shift, 17 is ctrl, 18 is alt
dojo.connect( window, 'onkeyup', this, function(evt) {
console.log("key up");
if( evt.keyCode == 16 ) // shift
if( evt.keyCode == dojo.keys.SHIFT ) // shift
this.behaviorManager.swapBehaviors( 'shiftMouse', 'normalMouse' );
}),
dojo.connect( window, 'onkeydown', this, function(evt) {
console.log("key down");
if( evt.keyCode == 16 ) // shift
if( evt.keyCode == dojo.keys.SHIFT ) // shift
this.behaviorManager.swapBehaviors( 'normalMouse', 'shiftMouse' );
})
];
Expand Down

0 comments on commit e5298aa

Please sign in to comment.