   # Device observer delegate
 
   deviceDidActivateVirtualKeyboard: ->
-    @canceledInputEventsSupported = false
+    @virtualKeyboardIsActive = true
 
   deviceDidDeactivateVirtualKeyboard: ->
-    @canceledInputEventsSupported = true
+    delete @virtualKeyboardIsActive
 
   # Input handlers
 

        @delegate?.inputControllerWillPerformTyping()
        @responder?.deleteWordBackward()
        event.preventDefault()

  cancelInputEvent: (event) ->
    if @canceledInputEventsSupported
      event.preventDefault()
      true

      else if event.which isnt 0 and event.charCode isnt 0
        character = String.fromCharCode event.charCode

      if character?
        event.preventDefault()
        @delegate?.inputControllerWillPerformTyping()
        @responder?.insertString(character)

