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

Michael Jumper commented on GUACAMOLE-518:
------------------------------------------

{quote}
... to fix the shift issue I did the following change in en_us_qwerty.json file 
:-

{code:none}
map 0x29 0x02..0x0D ~ "`1234567890-="
map 0x10..0x1B 0x2B ~ "qwertyuiop[]\"
map 0x1E..0x28 ~ "asdfghjkl;'"
map 0x2C..0x35 ~ "zxcvbnm,./"

map 0x29 0x02..0x0D ~ "~!@#$%^&*()_+"
map 0x10..0x1B 0x2B ~ "QWERTYUIOP{}|"
map 0x1E..0x28 ~ "ASDFGHJKL:""
map 0x2C..0x35 ~ "ZXCVBNM<>?"
{code}

Shift key is handled separately in base.keymap and no need to add here.
{quote}

No, that is not how Guacamole's keymaps work. Each keymap describes the 
combination of modifiers and scancodes necessary to reproduce a particular 
keysym. Shift is not handled by the base keymap; it is *defined* by the base 
keymap. Shift is handled by tracking the state of the modifier and 
automatically pressing/releasing it as necessary to reproduce the typed key.

A pair of keymap lines like:

{code:none}
map -shift 0x1E ~ "a"
map +shift 0x1E ~ "A"
{code}

tell Guacamole that a lowercase letter "a" is typed with scancode 0x1E while 
shift is released, while an uppercase letter "A" is typed scancode 0x1E while 
shift is pressed. With this information, when Guacamole receives a keyboard 
event for either "a" or "A", it will be able to automatically update the state 
of the shift modifier as necessary to type the key remotely.

A pair of keymap lines like:

{code:none}
map 0x1E ~ "a"
map 0x1E ~ "A"
{code}

are simply wrong. They will only work if the input behavior of the user's local 
machine and the remote machine exactly match, which is not a safe assumption.

{quote}
Please look into it and do suggest if something is wrong over here.
{quote}

Sorry, but these changes are fundamentally flawed. The current keymap 
explicitly defines which keys require shift. Removing those definitions 
misinforms Guacamole that none of those keys require shift, which is incorrect.


> Shift incorrectly sent for uppercase letters while Caps Lock is active
> ----------------------------------------------------------------------
>
>                 Key: GUACAMOLE-518
>                 URL: https://issues.apache.org/jira/browse/GUACAMOLE-518
>             Project: Guacamole
>          Issue Type: Bug
>          Components: RDP
>         Environment: Remote operating System : Ubuntu 16.04.3 LTS 64-bit
> Local Browser : Chrome Version 64.0.3282.186 (Official Build) (64-bit)
> XRDP Version : 0.9.5
> Guacamole-Server Version : Latest Code [ Last Commit ID : 
> bc5b01d4d8ab0c3c89a08007316d33012261f6b3 - GUACAMOLE-448: Merge support for 
> configuring the level of caching used by RDP. ]
> Guacamole-Client Version : Latest Code [ Last Commit ID : 
> 5db2e3cae75a658b33515112a39eb2f5f8eef4a8  - GUACAMOLE-161: Merge changes 
> adding Caps Lock to the do-not-auto-repeat list. ] 
>            Reporter: Amarjeet Singh
>            Assignee: Michael Jumper
>            Priority: Minor
>         Attachments: image.png, image.png, image.png, image.png
>
>
> As reported [in the user@ mailing 
> list|https://lists.apache.org/thread.html/6008116eac7ebf2fdd51460672040b07b46c30c610b05a198575c05e@%3Cuser.guacamole.apache.org%3E]:
> {quote}
> I have been writing in Libre Office Writer on Guacamole RDP . I clicked CAPS 
> lock and started writing but the text was still in lowercase.
> Guacamole-Server version : 0.9.14
> Guacamole-Client version : 0.9.14
> XRDP Version : 0.9.5
> Remote O.S. : Ubuntu 16.04.3 LTS 64-bit
> I have not done any modifications in the code.
> If I reconnect the RDP session with CAPS lock on, then it starts printing 
> uppercase but if I again click CAPS lock to set it to lowercase, it still 
> prints the uppercase.
> {quote}
> This is apparently due to the way Guacamole's RDP support handles uppercase 
> letters and Caps Lock:
> * The client side of Guacamole handles Caps Lock correctly, and forwards this 
> key as a key event to the Guacamole server.
> * The RDP support handles the _key_ correctly, sending the corresponding 
> scancode to the RDP server.
> * The RDP support handles the Caps Lock _state_ incorrectly, continuing to 
> send Shift keypresses for uppercase letters despite Caps Lock being active.
> The RDP support needs to be modified such that the behavior of keys within 
> each keyboard layout when Caps Lock is enabled, various modifiers are 
> active/inactive, etc. can be correctly modeled. The keymaps currently only 
> provide for defining behavior based on modifiers.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to