Skip to content

Commit

Permalink
Fix bug where the virtual keys would always remain depressed
Browse files Browse the repository at this point in the history
  • Loading branch information
rcjsuen committed Jan 15, 2016
1 parent 149ee93 commit e0aaaf5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions keyboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,13 @@ function keyUpHandler(e) {
if (e.keyCode === ASCII_SHIFT) {
shiftDown = false;

if (input.disabled) {
if (!input.disabled) {
requestAnimationFrame(drawKeyboard);
}
} else if (e.keyCode === ASCII_SPACEBAR) {
spaceDown = false;

if (input.disabled) {
if (!input.disabled) {
requestAnimationFrame(drawKeyboard);
}
} else {
Expand All @@ -165,7 +165,7 @@ function keyUpHandler(e) {
if (keyboard[i][j] === key) {
keyDown[i][j] = false;

if (input.disabled) {
if (!input.disabled) {
requestAnimationFrame(drawKeyboard);
}
return;
Expand Down

0 comments on commit e0aaaf5

Please sign in to comment.