             keydown : (remoteEvent, clientEvent) ->
                 if !@_pendingKeyup
                     @_pendingKeyup = true
-                    # TODO: this needs to listen on document, not target.
-                    #       this could conflict with a listener we've already
-                    #       added...
-                    #       that would be called first, since it was registered
-                    #       first.
-                    #       TODO: for now, keyup listening on server will be broken.
-                    #       TODO: if the server asks for keyup event, we register the
-                    #       special handler.
-                    monitor.document.addEventListener('keyup', @_keyupListener.bind(this))
+                    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))
+                    monitor.document.addEventListener('keyup', @_keyupListener.bind(this), true)
                 @_queuedKeyEvents.push(remoteEvent)
 
             # Valid targets:

            @activeEvents[nodeID] = {}
        @activeEvents[nodeID][type] = true
        if !@registeredEvents[type]
            @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]
                )
                rEvent = {}
                monitor.eventInitializers["#{EventTypeToGroup[event.type]}"](rEvent, event)
                @_queuedKeyEvents.push(rEvent)
                for ev in @_queuedKeyEvents
                    server.processEvent(ev)
                @_queuedKeyEvents = []

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