Skip to content

Commit

Permalink
Merge pull request #366 from quaertym/patch-1
Browse files Browse the repository at this point in the history
Use W,A,S,D for navigation in addition to arrow keys
  • Loading branch information
h4v1nfun authored Aug 11, 2016
2 parents 0da03a0 + e22078a commit 4929b6e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/views/map/controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,15 @@ const handleMove = action((direction) => {

window.addEventListener('keydown', ({ keyCode }) => {
switch (keyCode) {
case 65:
case 81:
case 37: { return handleMove('LEFT') }
case 87:
case 90:
case 38: { return handleMove('UP') }
case 68:
case 39: { return handleMove('RIGHT') }
case 83:
case 40: { return handleMove('DOWN') }
default: return undefined
}
Expand Down

0 comments on commit 4929b6e

Please sign in to comment.