public void HandleInput()
        {
            browser.UIHandler.InputUpdate();
            bool focusChanged = false;

            if (browser.UIHandler.MouseHasFocus || mouseWasFocused)
            {
                HandleMouseInput();
            }
            if (browser.UIHandler.MouseHasFocus != mouseWasFocused)
            {
                browser.UIHandler.BrowserCursor.HasMouse = browser.UIHandler.MouseHasFocus;
                focusChanged = true;
            }
            mouseWasFocused = browser.UIHandler.MouseHasFocus;



            if (kbWasFocused != browser.UIHandler.KeyboardHasFocus)
            {
                focusChanged = true;
            }

            if (browser.UIHandler.KeyboardHasFocus)
            {
                if (!kbWasFocused)
                {
                    BrowserNative.zfb_setFocused(browser.browserId, kbWasFocused = true);
                }
                HandleKeyInput();
            }
            else
            {
                if (kbWasFocused)
                {
                    BrowserNative.zfb_setFocused(browser.browserId, kbWasFocused = false);
                }
            }

            if (focusChanged)
            {
                browser._RaiseFocusEvent(browser.UIHandler.MouseHasFocus, browser.UIHandler.KeyboardHasFocus);
            }
        }