Skip to content

Commit

Permalink
space behaves like right arrow
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel3735928559 committed Dec 4, 2015
1 parent 8ae06ab commit 692fa55
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion guppy/guppy.js
Original file line number Diff line number Diff line change
Expand Up @@ -1071,6 +1071,7 @@ Guppy.kb.DOWN = 40;
Guppy.kb.LEFT = 37;
Guppy.kb.RIGHT = 39;
Guppy.kb.RPAREN = 48;
Guppy.kb.SPACE = 32;
Guppy.kb.BACKSPACE = 8;
Guppy.kb.ENTER = 13;
Guppy.kb.HOME = 36;
Expand Down Expand Up @@ -1178,7 +1179,7 @@ Guppy.key_down = function(e){
if(keycode == Guppy.kb.UP){ e.returnValue = false; e.preventDefault(); Guppy.active_guppy.up(); }
else if(keycode == Guppy.kb.DOWN){ e.returnValue = false; e.preventDefault(); Guppy.active_guppy.down(); }
else if(keycode == Guppy.kb.LEFT){ e.returnValue = false; e.preventDefault(); Guppy.active_guppy.left(); }
else if(keycode == Guppy.kb.RIGHT){ e.returnValue = false; e.preventDefault(); Guppy.active_guppy.right(); }
else if(keycode == Guppy.kb.RIGHT || keycode == Guppy.kb.SPACE){ e.returnValue = false; e.preventDefault(); Guppy.active_guppy.right(); }
else if(keycode == Guppy.kb.HOME){ e.returnValue = false; e.preventDefault(); Guppy.active_guppy.home(); }
else if(keycode == Guppy.kb.END){ e.returnValue = false; e.preventDefault(); Guppy.active_guppy.end(); }
else if(keycode == Guppy.kb.BACKSPACE){ e.returnValue = false; e.preventDefault(); Guppy.active_guppy.backspace(); }
Expand Down

0 comments on commit 692fa55

Please sign in to comment.