You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Set keyboard layout to "Norwegian" in both server and client
Type any special character. E.g. å
Expected: The same character appears in the client, å. Actual: The client tries to use the english layout keystrokes to represent the letter, resulting in ˚ª instead of å and + instead of -.
Extra info
This appears to be related to how X11LayoutParser does mapping from layout names "no,us" to ISO-639-1 language codes.
Calculations in X11LayoutParser.getX11LanguageList():
From XkbRF_GetNamesProp():
- Layouts: `no,us,us`
- Variants: `,,`
Intermediate: nor, nob, nno, eng, eng # In `evdev.xml` the norwegian keyboard layout has three associated languages
Result: no, nb, nn, us # After mapping to ISO-639-1 and removing duplicates
getLanguageGroupID(lang) returns the index of the language in the X11LanguageList resulting in this incorrect mapping:
getLanguageGroupID("no") => 0,
getLanguageGroupID("nb") => 0,
getLanguageGroupID("nn") => 0,
getLanguageGroupID("us") => 1, // 2 is also fine in this case
Relevant logs
Startup (with extra logs):
synergy-core [2024-03-31T11:50:10] - DEBUG1 - keyboard.getLayout(): "no,us,us"
synergy-core [2024-03-31T11:50:10] - DEBUG1 - keyboard.getVariant(): ",,"
synergy-core [2024-03-31T11:50:10] - INFO - local languages: no, nb, nn, en
synergy-core [2024-03-31T11:50:10] - INFO - remote languages: nb, en
synergy-core [2024-03-31T11:50:10] - DEBUG1 - xkb mapping
synergy-core [2024-03-31T11:50:10] - DEBUG1 - Group names: 3
synergy-core [2024-03-31T11:50:10] - DEBUG1 - Group name 0: Norwegian
synergy-core [2024-03-31T11:50:10] - DEBUG1 - Group name 1: English (US)
synergy-core [2024-03-31T11:50:10] - DEBUG1 - Group name 2: English (US)
Pressing å: (with extra logs)
synergy-core [2024-03-31T11:58:14] - DEBUG1 - mapKey 00e5 (229 | å) with mask 2000, start state: 0000, group: 0
synergy-core [2024-03-31T11:58:14] - DEBUG1 - language nb has group id 1
synergy-core [2024-03-31T11:58:14] - DEBUG1 - best key index 1 of 1 (exact)
synergy-core [2024-03-31T11:58:14] - DEBUG1 - found key in group 1
synergy-core [2024-03-31T11:58:14] - DEBUG1 - language nb has group id 1
synergy-core [2024-03-31T11:58:14] - DEBUG1 - key item list count 2
synergy-core [2024-03-31T11:58:14] - DEBUG1 - item 0 0022
synergy-core [2024-03-31T11:58:14] - DEBUG1 - item 1 0026
synergy-core [2024-03-31T11:58:14] - DEBUG1 - flip: 0021 (0000 vs 0021 in 1021 - 0000)
synergy-core [2024-03-31T11:58:14] - DEBUG1 - state: 0021,0000,1001
synergy-core [2024-03-31T11:58:14] - DEBUG1 - flip: 0001 (0021 vs 0000 in 1001 - 0000)
synergy-core [2024-03-31T11:58:14] - DEBUG1 - desired state: 2000 0020,0000,1001
synergy-core [2024-03-31T11:58:14] - DEBUG1 - flip: 0000 (0020 vs 2000 in effe - 6020)
synergy-core [2024-03-31T11:58:14] - DEBUG1 - mapped to 026, new state 0000
synergy-core [2024-03-31T11:58:14] - DEBUG1 - keystrokes:
synergy-core [2024-03-31T11:58:14] - DEBUG1 - - 0x00005c (92)
synergy-core [2024-03-31T11:58:14] - DEBUG1 - - 0x000032 (50)
synergy-core [2024-03-31T11:58:14] - DEBUG1 - - 0x000022 (34)
synergy-core [2024-03-31T11:58:14] - DEBUG1 - - 0x000022 (34)
synergy-core [2024-03-31T11:58:14] - DEBUG1 - skipping keystroke, language sync is disabled
synergy-core [2024-03-31T11:58:14] - DEBUG1 - - 0x000032 (50)
synergy-core [2024-03-31T11:58:14] - DEBUG1 - - 0x000026 (38)
synergy-core [2024-03-31T11:58:14] - DEBUG1 - - 0x00005c (92)
synergy-core [2024-03-31T11:58:14] - DEBUG1 - recv key up id=0x000000e5, mask=0x2000, button=0x001a
synergy-core [2024-03-31T11:58:14] - DEBUG1 - keystrokes:
synergy-core [2024-03-31T11:58:14] - DEBUG1 - - 0x000026 (38)
Correct keystrokes:
synergy-core [2024-03-31T12:01:50] - DEBUG1 - mapKey 00e5 (229 | å) with mask 2000, start state: 0000, group: 0
synergy-core [2024-03-31T12:01:50] - DEBUG1 - Forced selection of group 0
synergy-core [2024-03-31T12:01:50] - DEBUG1 - best key index 1 of 1 (exact)
synergy-core [2024-03-31T12:01:50] - DEBUG1 - found key in group 0
synergy-core [2024-03-31T12:01:50] - DEBUG1 - language nb has group id 1
synergy-core [2024-03-31T12:01:50] - DEBUG1 - key item list count 1
synergy-core [2024-03-31T12:01:50] - DEBUG1 - item 0 0022
synergy-core [2024-03-31T12:01:50] - DEBUG1 - state: 0000,0000,1021
synergy-core [2024-03-31T12:01:50] - DEBUG1 - flip: 0000 (0000 vs 0000 in 1021 - 0000)
synergy-core [2024-03-31T12:01:50] - DEBUG1 - desired state: 2000 0000,0000,1021
synergy-core [2024-03-31T12:01:50] - DEBUG1 - flip: 0000 (0000 vs 2000 in efde - 6020)
synergy-core [2024-03-31T12:01:50] - DEBUG1 - mapped to 022, new state 0000
synergy-core [2024-03-31T12:01:50] - DEBUG1 - keystrokes:
synergy-core [2024-03-31T12:01:50] - DEBUG1 - - 0x000022 (34)
synergy-core [2024-03-31T12:01:50] - DEBUG1 - recv key up id=0x000000e5, mask=0x2000, button=0x001a
synergy-core [2024-03-31T12:01:50] - DEBUG1 - keystrokes:
synergy-core [2024-03-31T12:01:50] - DEBUG1 - - 0x000022 (34)
The text was updated successfully, but these errors were encountered:
Operating Systems
Server: Windows 10
Client: Ubuntu 23.10
Synergy Version
Synergy 3 RC3 - v3.0.79.1-rc3
Steps to Reproduce
å
Expected: The same character appears in the client,
å
.Actual: The client tries to use the english layout keystrokes to represent the letter, resulting in
˚ª
instead ofå
and+
instead of-
.Extra info
This appears to be related to how
X11LayoutParser
does mapping from layout names "no,us" to ISO-639-1 language codes.Calculations in
X11LayoutParser.getX11LanguageList()
:getLanguageGroupID(lang)
returns the index of the language in the X11LanguageList resulting in this incorrect mapping:Correct mapping should be:
Relevant logs
Startup (with extra logs):
Pressing
å
: (with extra logs)Correct keystrokes:
The text was updated successfully, but these errors were encountered: