function __send_key(pressed, keysym) {
        if (GuacUI.Client.isMenuShown() || !GuacUI.Client.text_input.enabled)
            return true;

        if(lastCtrl){
            if(keysym !== 99 && keysym !== 118 && keysym !== 120){
                GuacUI.Client.attachedClient.sendKeyEvent(1, lastCtrl);
                lastCtrl = false;
            }
        }
        if(keysym === 0xFFE3 || keysym === 0xFFE4){
            lastCtrl = pressed ? keysym : false;
        }

        if(CTRL_KEYS[keysym] && ctrlKeyCount > -1){
            ctrlKeyCount += (pressed?1:-1);
        }

        if((keysym > 0xFF || ctrlKeyCount > 0) && lastCtrl === false){
            GuacUI.Client.attachedClient.sendKeyEvent(pressed, keysym);
            return false;
        }
        return true;

    }
Attaches a Guacamole.Client to the client UI, such that Guacamole events
affect the UI, and local events affect the Guacamole.Client. If a client
is already attached, it is replaced.

@param {Guacamole.Client} guac The Guacamole.Client to attach to the UI.