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:15:00 UTC

[jira] [Commented] (GUACAMOLE-520) Japanese keyboard layout for RDP incorrect

    [ https://issues.apache.org/jira/browse/GUACAMOLE-520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17140114#comment-17140114 ] 

Kazuhiko Tanaka commented on GUACAMOLE-520:
-------------------------------------------

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}


> Japanese keyboard layout for RDP incorrect
> ------------------------------------------
>
>                 Key: GUACAMOLE-520
>                 URL: https://issues.apache.org/jira/browse/GUACAMOLE-520
>             Project: Guacamole
>          Issue Type: Bug
>          Components: RDP
>            Reporter: Amarjeet Singh
>            Priority: Minor
>         Attachments: Keyboard_testing_report_Guacamole.xlsx
>
>
> [The Japanese keyboard layout definition used by Guacamole's RDP support|https://github.com/apache/guacamole-server/blob/e2feb416052b1a1ab33db6e79c5ea6e4f6f6eacf/src/protocols/rdp/keymaps/ja_jp_qwerty.keymap] currently contains the following:
> {code:none}
> #
> # Licensed to the Apache Software Foundation (ASF) under one
> # or more contributor license agreements.  See the NOTICE file
> # distributed with this work for additional information
> # regarding copyright ownership.  The ASF licenses this file
> # to you under the Apache License, Version 2.0 (the
> # "License"); you may not use this file except in compliance
> # with the License.  You may obtain a copy of the License at
> #
> #   http://www.apache.org/licenses/LICENSE-2.0
> #
> # Unless required by applicable law or agreed to in writing,
> # software distributed under the License is distributed on an
> # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> # KIND, either express or implied.  See the License for the
> # specific language governing permissions and limitations
> # under the License.
> #
> parent  "base"
> name    "ja-jp-qwerty"
> freerdp "KBD_JAPANESE"
> map -shift      0x02..0x0D 0x7D ~ "1234567890-^\"
> map -shift      0x10..0x1B      ~ "qwertyuiop@["
> map -shift      0x1E..0x28 0x2B ~ "asdfghjkl;:]"
> map -shift      0x2C..0x35 0x73 ~ "zxcvbnm,./\"
> map +shift      0x02..0x0A 0x0C 0x0D 0x7D ~ "!"#$%&'()=~|"
> map +shift      0x10..0x1B      ~ "QWERTYUIOP`{"
> map +shift      0x1E..0x28 0x2B ~ "ASDFGHJKL+*}"
> map +shift      0x2C..0x35 0x73 ~ "ZXCVBNM<>?_"
> map -shift      0x29            ~ 0xFF28
> map -shift      0x29            ~ 0xFF2A
> map +shift      0x29            ~ 0xFF29
> {code}
> This is inherently incorrect, as the Japanese keyboard can type far more characters than those given here. Even if the missing characters are correctly mapped, several of these characters depend on additional, Japanese-specific modifier/lock keys which the keymap format does not currently define.



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