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

Mike Jumper edited comment on GUACAMOLE-1037 at 4/21/20, 11:20 PM:
-------------------------------------------------------------------

Setting aside any issues with keyboard translation for the moment, the 
philosophy of Guacamole's keyboard support is that *local key identity dictates 
keyboard behavior*. Thus, with this in mind, regardless of what local layout 
you use:

* Don't press "Z" if you intend to press "W".
* Don't press "W" if you intend to press "Z".

Remote keyboard layout is intended to be opaque to the user, as is the 
underlying protocol of the connection. The user should not need to know that 
their connection leverages RDP or VNC, and should not need to know whether 
their local keyboard matches the remote keyboard. It's not so much that 
Guacamole tries to make RDP work like VNC, but that Guacamole tries to make 
everything seamless regardless of the underlying technology. Users should be 
able to simply use whichever keyboard layout they decide to use locally and 
have that just work. They shouldn't need to be conscious of implementation 
details like the underlying protocol or the remote keyboard layout.

I don't believe it is correct to say that keyboard shortcuts tend to be care 
about physical layout - no application documents their keyboard shortcuts as 
"press Ctrl and the leftmost key in the third row", they say "press Ctrl+Z". In 
the case of Guacamole, as long as keyboard translation is behaving correctly, 
you just need to press local Ctrl and local Z, wherever those keys are located 
in your case.

Regarding the issue at hand (Caps Lock), the problem is that Guacamole's RDP 
keymap translation is not taking caps lock state into account. This means that 
Shift is being sent unnecessarily, effectively undoing Caps Lock. Things worked 
as expected prior to GUACAMOLE-859 because the incorrect Caps Lock coupled with 
the incorrect Shift produced the correct behavior. The behavior with respect to 
Shift, now apparent as a bug due to the implementation of GUACAMOLE-859, still 
needs to be corrected.


was (Author: mike.jumper):
Setting aside any issues with keyboard translation for the moment, the 
philosophy of Guacamole's keyboard support is that *local key identity dictates 
keyboard behavior*. Thus, with this in mind, regardless of what local layout 
you use:

* Don't press "Z" if you intend to press "W".
* Don't press "W" if you intend to press "Z".

Remote keyboard layout is intended to be opaque to the user, as is the 
underlying protocol of the connection. The user should not need to know that 
they connection leverages RDP, or VNC, and should not need to know whether 
their local keyboard matches the remote keyboard. It's not so much that 
Guacamole tries to make RDP work like VNC, but that Guacamole tries to make 
everything seamless regardless of the underlying technology. Users should be 
able to simply use whichever keyboard layout they decide to use locally and 
have that just work. They shouldn't need to be conscious of implementation 
details like the underlying protocol or the remote keyboard layout.

I don't believe it is correct to say that keyboard shortcuts tend to be care 
about physical layout - no application documents their keyboard shortcuts as 
"press Ctrl and the leftmost key in the third row", they say "press Ctrl+Z". In 
the case of Guacamole, as long as keyboard translation is behaving correctly, 
you just need to press local Ctrl and local Z, wherever those keys are located 
in your case.

Regarding the issue at hand (Caps Lock), the problem is that Guacamole's RDP 
keymap translation is not taking caps lock state into account. This means that 
Shift is being sent unnecessarily, effectively undoing Caps Lock. Things worked 
as expected prior to GUACAMOLE-859 because the incorrect Caps Lock coupled with 
the incorrect Shift produced the correct behavior. The behavior with respect to 
Shift, now apparent as a bug due to the implementation of GUACAMOLE-859, still 
needs to be corrected.

> Caps Lock doesn't work via RDP (1.2 guacd)
> ------------------------------------------
>
>                 Key: GUACAMOLE-1037
>                 URL: https://issues.apache.org/jira/browse/GUACAMOLE-1037
>             Project: Guacamole
>          Issue Type: Bug
>          Components: guacd
>    Affects Versions: 1.2.0
>            Reporter: andrea lattanzi
>            Priority: Minor
>
> Hello!
> I was pushed to use guacd 1.2 after facing 1.1 huge memory leaks bug.
> The users signalled me this bug that could be workaround by running OSK on 
> the remote.
> To log key events I used this site:
> [https://unixpapa.com/js/testkey.html]
> Now I'm pasting the results in several conditions of the following test 
> sequence:
> 1) "a" key low case
> 2) caps lock
> 3) "A" key 
> 4) caps lock
> 5) "a" key
> The client OS is Ubuntu, but OS and browser/version combinations don't look 
> to affect the bug.
>  
> *Just the client via Chromium:*
> keydown keyCode=65 (A) which=65 (A) charCode=0 
>  keypress keyCode=97 (a) which=97 (a) charCode=97 (a) 
>  keyup keyCode=65 (A) which=65 (A) charCode=0 
>  keydown keyCode=20 which=20 charCode=0 
>  keyup keyCode=20 which=20 charCode=0 
>  keydown keyCode=65 (A) which=65 (A) charCode=0 
>  keypress keyCode=65 (A) which=65 (A) charCode=65 (A) 
>  keyup keyCode=65 (A) which=65 (A) charCode=0 
>  keydown keyCode=20 which=20 charCode=0 
>  keyup keyCode=20 which=20 charCode=0 
>  keydown keyCode=65 (A) which=65 (A) charCode=0 
>  keypress keyCode=97 (a) which=97 (a) charCode=97 (a) 
>  keyup keyCode=65 (A) which=65 (A) charCode=0
>  
> *client via Chromium, guacamole 0.9.14 RDP*
> keydown keyCode=65 (A) which=65 (A) charCode=0 
>  keypress keyCode=97 (a) which=97 (a) charCode=97 (a) 
>  keyup keyCode=65 (A) which=65 (A) charCode=0 
>  keydown keyCode=255 which=255 charCode=0 
>  keyup keyCode=255 which=255 charCode=0 
>  keydown keyCode=16 which=16 charCode=0 
>  keydown keyCode=65 (A) which=65 (A) charCode=0 
>  keypress keyCode=65 (A) which=65 (A) charCode=65 (A) 
>  keyup keyCode=16 which=16 charCode=0 
>  keydown keyCode=16 which=16 charCode=0 
>  keyup keyCode=65 (A) which=65 (A) charCode=0 
>  keyup keyCode=16 which=16 charCode=0 
>  keydown keyCode=255 which=255 charCode=0 
>  keyup keyCode=255 which=255 charCode=0 
>  keydown keyCode=65 (A) which=65 (A) charCode=0 
>  keypress keyCode=97 (a) which=97 (a) charCode=97 (a) 
>  keyup keyCode=65 (A) which=65 (A) charCode=0
>  
> *client via Chromium, guacamole 1.1, guacd 1.2, RDP (bug)*
> keydown keyCode=65 (A) which=65 (A) charCode=0 
>  keypress keyCode=97 (a) which=97 (a) charCode=97 (a) 
>  keyup keyCode=65 (A) which=65 (A) charCode=0 
>  keydown keyCode=20 which=20 charCode=0 
>  keyup keyCode=20 which=20 charCode=0 
>  keydown keyCode=16 which=16 charCode=0 
>  keydown keyCode=65 (A) which=65 (A) charCode=0 
>  keypress keyCode=97 (a) which=97 (a) charCode=97 (a) 
>  keyup keyCode=16 which=16 charCode=0 
>  keydown keyCode=16 which=16 charCode=0 
>  keyup keyCode=65 (A) which=65 (A) charCode=0 
>  keyup keyCode=16 which=16 charCode=0 
>  keydown keyCode=20 which=20 charCode=0 
>  keyup keyCode=20 which=20 charCode=0 
>  keydown keyCode=65 (A) which=65 (A) charCode=0 
>  keypress keyCode=97 (a) which=97 (a) charCode=97 (a) 
>  keyup keyCode=65 (A) which=65 (A) charCode=0 
>  keydown keyCode=16 which=16 charCode=0 
>  keyup keyCode=16 which=16 charCode=0
>  
> *client via Chromium, guacamole 1.0, RDP*
> keydown keyCode=65 (A) which=65 (A) charCode=0 
>  keypress keyCode=97 (a) which=97 (a) charCode=97 (a) 
>  keyup keyCode=65 (A) which=65 (A) charCode=0 
>  keydown keyCode=0 which=0 charCode=0 
>  keyup keyCode=0 which=0 charCode=0 
>  keydown keyCode=16 which=16 charCode=0 
>  keydown keyCode=65 (A) which=65 (A) charCode=0 
>  keypress keyCode=65 (A) which=65 (A) charCode=65 (A) 
>  keyup keyCode=16 which=16 charCode=0 
>  keydown keyCode=16 which=16 charCode=0 
>  keyup keyCode=65 (A) which=65 (A) charCode=0 
>  keyup keyCode=16 which=16 charCode=0 
>  keydown keyCode=0 which=0 charCode=0 
>  keyup keyCode=0 which=0 charCode=0 
>  keydown keyCode=65 (A) which=65 (A) charCode=0 
>  keypress keyCode=97 (a) which=97 (a) charCode=97 (a) 
>  keyup keyCode=65 (A) which=65 (A) charCode=0 
>  keydown keyCode=16 which=16 charCode=0 
>  keyup keyCode=16 which=16 charCode=0
>  
> *client via Chromium, guacamole 1.1, guacd 1.2, VNC*
> keydown keyCode=65 (A) which=65 (A) charCode=0 
>  keypress keyCode=97 (a) which=97 (a) charCode=97 (a) 
>  textInput data=a
>  akeyup keyCode=65 (A) which=65 (A) charCode=0 
>  keydown keyCode=16 which=16 charCode=0 
>  keydown keyCode=65 (A) which=65 (A) charCode=0 
>  keypress keyCode=65 (A) which=65 (A) charCode=65 (A) 
>  textInput data=A
>  Akeyup keyCode=16 which=16 charCode=0 
>  keyup keyCode=65 (A) which=65 (A) charCode=0 
>  keydown keyCode=65 (A) which=65 (A) charCode=0 
>  keypress keyCode=97 (a) which=97 (a) charCode=97 (a) 
>  textInput data=a
>  akeyup keyCode=65 (A) which=65 (A) charCode=0
>  
> *client via Firefox, guacamole 0.9.14 RDP*
> keydown keyCode=65 (A) which=65 (A) charCode=0 
>  keypress keyCode=97 (a) which=97 (a) charCode=97 (a) 
>  textInput data=a
>  akeyup keyCode=65 (A) which=65 (A) charCode=0 
>  keydown keyCode=255 which=255 charCode=0 
>  keyup keyCode=255 which=255 charCode=0 
>  keydown keyCode=16 which=16 charCode=0 
>  keydown keyCode=65 (A) which=65 (A) charCode=0 
>  keypress keyCode=65 (A) which=65 (A) charCode=65 (A) 
>  textInput data=A
>  Akeyup keyCode=16 which=16 charCode=0 
>  keydown keyCode=16 which=16 charCode=0 
>  keyup keyCode=65 (A) which=65 (A) charCode=0 
>  keyup keyCode=16 which=16 charCode=0 
>  keydown keyCode=255 which=255 charCode=0 
>  keyup keyCode=255 which=255 charCode=0 
>  keydown keyCode=65 (A) which=65 (A) charCode=0 
>  keypress keyCode=97 (a) which=97 (a) charCode=97 (a) 
>  textInput data=a
>  akeyup keyCode=65 (A) which=65 (A) charCode=0
>  
> *client via Firefox, guacamole 1.1, guacd 1.2, RDP (bug)*
> keydown keyCode=65 (A) which=65 (A) charCode=0 
>  keypress keyCode=97 (a) which=97 (a) charCode=97 (a) 
>  textInput data=a
>  akeyup keyCode=65 (A) which=65 (A) charCode=0 
>  keydown keyCode=20 which=20 charCode=0 
>  keyup keyCode=20 which=20 charCode=0 
>  keydown keyCode=16 which=16 charCode=0 
>  keydown keyCode=65 (A) which=65 (A) charCode=0 
>  keypress keyCode=97 (a) which=97 (a) charCode=97 (a) 
>  textInput data=a
>  akeyup keyCode=16 which=16 charCode=0 
>  keydown keyCode=16 which=16 charCode=0 
>  keyup keyCode=65 (A) which=65 (A) charCode=0 
>  keyup keyCode=16 which=16 charCode=0 
>  keydown keyCode=20 which=20 charCode=0 
>  keyup keyCode=20 which=20 charCode=0 
>  keydown keyCode=65 (A) which=65 (A) charCode=0 
>  keypress keyCode=97 (a) which=97 (a) charCode=97 (a) 
>  textInput data=a
>  akeyup keyCode=65 (A) which=65 (A) charCode=0
>  
> I hope this could help.
>  



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

Reply via email to