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

Mike Jumper commented on GUACAMOLE-943:
---------------------------------------

No, that sort of mapping should never be done on the client side. Guacamole 
handles the client side of key events exactly the same for all protocols, with 
Shift and the function keys being sent as you would expect: press/release 
events for each relevant key.

Translation of these key events for consumption by SSH (or, really, by the 
application within the terminal) is handled by the SSH protocol support. There 
is no "Shift" key event within the terminal, nor any press/release events. 
Everything is simply the raw data that was typed. If you press "a", then the 
byte "a" is sent. If you manage to type a more complex character, a Unicode 
sequence is sent. Other keys, like "Escape", "Return", "Backspace", and the 
arrow keys send control sequences. This is also true for the function keys:

https://github.com/apache/guacamole-server/blob/68a628581866c4d3797cea33d53fa91555cc4383/src/terminal/terminal.c#L1599-L1611

If you're seeing incorrect behavior for Shift+F1 within Guacamole's SSH support 
vs. other terminals, then it sounds like the state of Shift needs to be taken 
into account before deciding the control sequence to send for these function 
keys.

> Shift-Fn[1-24] Key Mapping over SSH
> -----------------------------------
>
>                 Key: GUACAMOLE-943
>                 URL: https://issues.apache.org/jira/browse/GUACAMOLE-943
>             Project: Guacamole
>          Issue Type: Bug
>          Components: SSH
>    Affects Versions: 1.1.0
>         Environment: RHEL 7
>            Reporter: John Filo
>            Priority: Major
>
> We are using Guacamole with SSH connections and we have an application that 
> requires Shift-Fn keys mapped through for Shift-Fn1 to Shift-Fn24.
> On the target SSH server, if I use `showkey -a` it shows that Fn1 and 
> Shift-Fn1 map through as:
> {code:java}
> sh-4.2$ showkey -a
> Press any keys - Ctrl-D will terminate this program
> Fn1 is
> ^[OP 27 0033 0x1b 
>      79 0117 0x4f
>      80 0120 0x50
> Shift-Fn1 is 
> ^[[1;2P          27 0033 0x1b
>          91 0133 0x5b
>          49 0061 0x31
>          59 0073 0x3b
>          50 0062 0x32
>          80 0120 0x50{code}
> Whereas, via Guacamole Client, if I use `showkey -a` it shows that Fn1 and 
> Shift-Fn1 map through as:
> {code:java}
> sh-4.2$ showkey -a
> Press any keys - Ctrl-D will terminate this program
> Fn1 is 
> ^[[[A 27 0033 0x1b
>       91 0133 0x5b
>       91 0133 0x5b
>       65 0101 0x41
> Shift-Fn1 is 
> ^[[[A  27 0033 0x1b
>        91 0133 0x5b
>        91 0133 0x5b
>        65 0101 0x41
> {code}
> As you can see, using Guacamole Client the Shift key doesn't seem to be 
> mapped through with Fn1.
> Where/How are keys mapped through for the SSH protocol?
> Is it possible to add Shift-Fn[1-24] key mappings?



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

Reply via email to