             @activeEvents[nodeID] = {}
         @activeEvents[nodeID][type] = true
         if !@registeredEvents[type]
-            @document.addEventListener(type, @_handler, true)
+            # TODO: unit test for this case
+            if type == 'keyup'
+                @document.addEventListener(type,
+                                           @specialEventHandlers._keyupListener,
+                                           true)
+            else
+                @document.addEventListener(type, @_handler, true)
             @registeredEvents[type] = true
 
     # listeners is an array of params objects for addEventListener.

                    targetID : event.target.__nodeID
                    args : ['value', event.target.value]
                )
                for rEvent in @_queuedKeyEvents
                    server.processEvent(rEvent)
                @_queuedKeyEvents = []

            # We defer the event until keyup has fired.  The order for

            keydown : (remoteEvent, clientEvent) ->
                if !@_pendingKeyup
                    @_pendingKeyup = true
                    monitor.document.addEventListener('keyup', @_keyupListener.bind(this), true)
                @_queuedKeyEvents.push(remoteEvent)

            keypress : (remoteEvent, clientEvent) ->
                if !@_pendingKeyup
                    @_pendingKeyup = true
                    monitor.document.addEventListener('keyup', @_keyupListener.bind(this), true)
                @_queuedKeyEvents.push(remoteEvent)

            # Valid targets:
