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

Mike Jumper commented on GUACAMOLE-1901:
----------------------------------------

I don't think we have a document covering the keyboard layout file format.

[~daniel_azulay9], please take a look at an established keymap and let us know 
if you have any specific questions. The mapping files are each essentially 
easier-to-maintain shorthand describing which Windows scancodes are equivalent 
to which X11 keysyms, with optional modifier states if a keysym is equivalent 
to a certain scancode only when certain modifiers are held/released.

For example, [the following excerpt from 
de_de_qwertz.keymap|https://github.com/apache/guacamole-server/blob/94a755c90a7511969884774dbca2ef2ab5958ba6/src/protocols/rdp/keymaps/de_de_qwertz.keymap#L35]:

{code:none}
map -caps -altgr +shift      0x1E..0x28 0x2B ~ "ASDFGHJKLÖÄ'"
{code}

Means "the scancodes 0x1E through 0x28 inclusive, and the scancode 0x2B, map 
respectively to the X11 keysyms for the characters in the string 'ASDFGHJKLÖÄ', 
so long as Caps Lock is not enabled, AltGr is released, and Shift is held".

Another example:

{code:none}
map +altgr -shift 0x09 ~ "["
{code}

Means "the scancode 0x09 maps to the X11 keysym for the character '[', so long 
as AltGr is held and Shift is released".

For cases where the X11 keysym does not correspond to a character, you can 
specify it numerically. For example, [from the base 
keymap|https://github.com/apache/guacamole-server/blob/94a755c90a7511969884774dbca2ef2ab5958ba6/src/protocols/rdp/keymaps/base.keymap#L80-L82]:

{code:none}
# Modifiers
map      0x2A ~ 0xffe1 # Shift_L
map      0x36 ~ 0xffe2 # Shift_R
{code}

The important thing is that the full context of each scancode is spelled out, 
so that Guacamole can accurately translate between whatever keyboard layout the 
user is using locally and the keyboard layout of the server. Guacamole will 
automatically set/clear modifiers within the RDP session to ensure that the 
identity of keys is maintained, but can't do this if it doesn't know which 
modifiers impact the identity if each key in the layout.

> RDP keyboard layout in Hebrew
> -----------------------------
>
>                 Key: GUACAMOLE-1901
>                 URL: https://issues.apache.org/jira/browse/GUACAMOLE-1901
>             Project: Guacamole
>          Issue Type: Improvement
>          Components: RDP
>            Reporter: Daniel Azulay
>            Priority: Minor
>         Attachments: Screen Recording 2024-01-08 at 12.05.48 PM.mov
>
>
> Hello,
> I'm using both the guac client & server for RDP usage.
> When my keyboard layout is set to `en-us-qwerty` on the RDP, and I switch to 
> a Hebrew keyboard and press ",", I get a different char "ת" (Hebrew letter).
>  
> Any idea if it's by design? is it a bug? 
> is it because the Hebrew keyboard layout is not supported?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to