You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@guacamole.apache.org by "Kazuhiko Tanaka (Jira)" <ji...@apache.org> on 2020/06/19 02:37:00 UTC

[jira] [Reopened] (GUACAMOLE-1004) Some keyboard input is not passed to the RDP server.

     [ https://issues.apache.org/jira/browse/GUACAMOLE-1004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kazuhiko Tanaka reopened GUACAMOLE-1004:
----------------------------------------

Zenkaku_Hankaku's problem was different from Capslock and Hiragana.

As a result of various verifications, the following was found.
There are three issues. One is a guacamole-server issue and the other is a guacamole-client issue.

--

There is the following mistake in src/protocols/rdp/keymaps/ja_jp_qwerty.keymap of guacamole-server.

{code:java}
map -shift      0x29            ~ 0xFF28
map -shift      0x29            ~ 0xFF2A
map +shift      0x29            ~ 0xFF29
{code}

You need to modify it as follows.

{code:java}
map -shift      0x29            ~ 0xFF28
map -shift      0x29            ~ 0xFF2A
map -shift      0x29            ~ 0xFF29
{code}

--

The following part of guacamole-client's src/main/webapp/modules/InputSink.js causes two EventListeners to be created for document keydown. As a result, the keydown event of the Zenkaku_Hankaku key cannot be acquired normally.

{code:javascript}
    // Automatically refocus input sink if part of DOM
    document.addEventListener("keydown", function refocusSink(e) {

        // Do not refocus if focus is on an input field
        var focused = document.activeElement;
        if (focused && focused !== document.body) {

            // Only consider focused input fields which are actually visible
            var rect = focused.getBoundingClientRect();
            if (rect.left + rect.width > 0 && rect.top + rect.height > 0)
                return;

        }

        // Refocus input sink instead of handling click
        sink.focus();

    }, true);
{code}

--

Zenkaku_Hankaku key is sent as a pair of Zenkaku keyup and Hankaku keydown or Hankaku keyup and Zenkaku keydown on the Japanese keyboard on Windows OS. Only the keydown is sent, so you need to add the following to no_repeat variable:

{code:javascript}
        0xFF28: true, // Zenkaku
        0xFF29: true, // Hankaku
{code}


> Some keyboard input is not passed to the RDP server.
> ----------------------------------------------------
>
>                 Key: GUACAMOLE-1004
>                 URL: https://issues.apache.org/jira/browse/GUACAMOLE-1004
>             Project: Guacamole
>          Issue Type: Bug
>            Reporter: Kazuhiko Tanaka
>            Priority: Minor
>
>     I entered the "Zenkaku_Hankaku" key, "Capslock" key, and "Hiragana" key, but they were not passed to the RDP server.  
>     Entering these keys affects the browser's IME.  Perhaps Guacamole does not handle these keys properly.  
>     If enter the "Zenkaku_Hankaku" key in a Japanese browser, "Zenkaku (keyup 243 and keydown 244)" and "Hankaku (keyup 244 and keydown 243)" will be entered alternately, so you need to obtain both.  
>     Also, when the text area was selected, JavaScript could not get "keydown" and only get "keyup" in some cases.  This may also be relevant.  
>     In particular, the "Zenkaku_Hankaku" key is a very important key for OS in Japanese environment.  If the "Zenkaku_Hankaku" key cannot be entered, nothing can be done.  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)