 
     yDir = 0
     xDir = 0
+    pressed = {
+      up: false,
+      down: false,
+      left: false,
+      right: false
+    }
 
     ship.addComponent('Keyboard, Motion')
       .bind('GamePause', (paused) ->

      if (ship.vx < 0 and ship.ax == 0) # decellerate
        ship.ax += (ACCELLERATE_X * 2)

    @listenTo ship, 'KeyUp', (e) ->
      return if ship.disableControls
      ship.shoot(false) if e.key is controlMap.fire
      ship.switchWeapon(false) if e.key is controlMap.switchWeapon
      ship.superWeapon(false) if e.key is controlMap.super

      yDir += 1 if e.key is controlMap.up
      yDir -= 1 if e.key is controlMap.down
      yDir = Math.min(1, Math.max(-1, yDir))
      ship.ay += (ACCELLERATE_Y * yDir)
      if (ship.vy > 0 and ship.ay == 0) # decellerate
        ship.ay -= (ACCELLERATE_Y * 2)
      if (ship.vy < 0 and ship.ay == 0) # decellerate
        ship.ay += (ACCELLERATE_Y * 2)

      xDir += 1 if e.key is controlMap.left
      xDir -= 1 if e.key is controlMap.right
      xDir = Math.min(1, Math.max(-1, xDir))
      ship.ax += (ACCELLERATE_X * xDir)
      if (ship.vx > 0 and ship.ax == 0) # decellerate
        ship.ax -= (ACCELLERATE_X * 2)
      if (ship.vx < 0 and ship.ax == 0) # decellerate
        ship.ax += (ACCELLERATE_X * 2)

      @vx = @prevSets.vx
      @vy = @prevSets.vy

    updateAcceleration = =>
      yDir = 0
      yDir -= 1 if pressed.up
      yDir += 1 if pressed.down
      yDir = Math.min(1, Math.max(-1, yDir))

      ship.ay += (ACCELLERATE_Y * yDir)
      if (ship.vy > 0 and ship.ay == 0) # decellerate
        ship.ay -= (ACCELLERATE_Y * 2)
      if (ship.vy < 0 and ship.ay == 0) # decellerate
        ship.ay += (ACCELLERATE_Y * 2)

      xDir = 0
      xDir -= 1 if pressed.left
      xDir += 1 if pressed.right
      xDir = Math.min(1, Math.max(-1, xDir))
      ship.ax += (ACCELLERATE_X * xDir)
      if (ship.vx > 0 and ship.ax == 0) # decellerate
