 
       @cursors = @input.keyboard.createCursorKeys()
       # Quit on Q
-      @quitKey = @input.keyboard.addKey Keyboard.Q
-      @quitKey.onDown.add @quit, @
-      @input.keyboard.removeKeyCapture Keyboard.Q
+      @quitKey = @_addKey Keyboard.Q, @quit
       # Quit on click at end.
       @onHit = @input[if @game.device.touch then 'onTap' else 'onUp']
       @onHit.add @quit, @


      @game.onBlur.remove @onBlur, @
      @game.onFocus.remove @onFocus, @
      @quitKey.onDown.remove @quit, @
      @onHit.remove @quit, @

      @gui?.destroy()
      @music.destroy()

    onBlur: ->
      @music?.pause()

      @mate.animations.add 'end', [4..MateLastFrame], 12

    _addMusic: ->
      @userVolume = 1
      @music = @add.audio 'bgm', 0, yes
      @music.mute = @developing or @debugging
      @music.play()
      @gui?.add(@music, 'mute').listen()
      increment = 0.1
      @loudKey = @_addKey Keyboard.EQUALS, => @userVolume += increment
      @muteKey = @_addKey Keyboard.ZERO, => @music.mute = not @music.mute
      @quietKey = @_addKey Keyboard.UNDERSCORE, => @userVolume -= increment

    _addPlatforms: ->
      @platforms = new Platforms 
