Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't switch keyboard layout on xpra 6.2.x #4445

Open
V-ctor opened this issue Dec 16, 2024 · 16 comments
Open

Can't switch keyboard layout on xpra 6.2.x #4445

V-ctor opened this issue Dec 16, 2024 · 16 comments
Labels
bug Something isn't working keyboard linux

Comments

@V-ctor
Copy link

V-ctor commented Dec 16, 2024

Can't switch keyboard layout on xpra 6.2.x by Ctrl+Space or other combinations.

Steps to reproduce the behavior:

  1. xpra start :12 --start=kate
  2. xpra attach ssh://name@ip/12
  3. press keys for switch layout
  4. no layout changes
  • Server OS: Kubuntu 24.10 (X server arm64 Oracle Cloud VM)
  • Client OS: Kubuntu 24.10 (Wayland)
  • Xpra v6.2.1-r0 (There is no 6.2.2 for arm64)
  • Xpra v6.2.2-r0 (amd64)
  • No ibus on both sides

Additional info

  1. xpra toolbox catches Ctrl and Space
  2. Active layouts US,RU
  3. The bug presents regardless of --no-keyboard-sync
  4. setxkbmap -query
  • Server
rules:      base
layout:     us,ru
  • Client
WARNING: Running setxkbmap against an Xwayland server
rules:      evdev
model:      pc105
layout:     us

tried
setxkbmap -layout 'us,ru' -model pc105 -option 'grp:ctrl_space_toggle,grp_led:scroll' (with no luck)

  • Server
rules:      base
model:      pc105
layout:     us,ru
options:    grp:ctrl_space_toggle,grp_led:scroll
  • Client
WARNING: Running setxkbmap against an Xwayland server
rules:      evdev
model:      pc105
layout:     us,ru
options:    grp:ctrl_space_toggle,grp_led:scroll
  1. setxkbmap -print -verbose 10
  • Server
Setting verbose level to 10
locale is C
Trying to load rules file ./rules/base...
Trying to load rules file /usr/share/X11/xkb/rules/base...
Success.
Applied rules from base:
rules:      base
layout:     us,ru
Trying to build keymap using the following components:
xkb_keymap {
};
  • Client
Setting verbose level to 10
WARNING: Running setxkbmap against an Xwayland server
locale is C
Trying to load rules file ./rules/evdev...
Trying to load rules file /usr/share/X11/xkb/rules/evdev...
Success.
Applied rules from evdev:
rules:      evdev
model:      pc105
layout:     us,ru
options:    grp:ctrl_space_toggle,grp_led:scroll
Trying to build keymap using the following components:
keycodes:   evdev+aliases(qwerty)
types:      complete
compat:     complete+ledscroll(group_lock)
symbols:    pc+us+ru:2+inet(evdev)+group(ctrl_space_toggle):1+group(ctrl_space_toggle):2
geometry:   pc(pc105)
xkb_keymap {
        xkb_keycodes  { include "evdev+aliases(qwerty)" };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete+ledscroll(group_lock)"        };
        xkb_symbols   { include "pc+us+ru:2+inet(evdev)+group(ctrl_space_toggle):1+group(ctrl_space_toggle):2"  };
        xkb_geometry  { include "pc(pc105)"     };
};
  1. xmodmap -pke
  • Server
keycode   8 = ISO_Level5_Shift NoSymbol ISO_Level5_Shift
keycode   9 = Escape NoSymbol Escape
keycode  10 = 1 exclam 1 exclam
keycode  11 = 2 at 2 quotedbl
keycode  12 = 3 numbersign 3 numerosign
keycode  13 = 4 dollar 4 semicolon
keycode  14 = 5 percent 5 percent
keycode  15 = 6 asciicircum 6 colon
keycode  16 = 7 ampersand 7 question
keycode  17 = 8 asterisk 8 asterisk U20BD
keycode  18 = 9 parenleft 9 parenleft
keycode  19 = 0 parenright 0 parenright
keycode  20 = minus underscore minus underscore
keycode  21 = equal plus equal plus
keycode  22 = BackSpace BackSpace BackSpace BackSpace
keycode  23 = Tab ISO_Left_Tab Tab ISO_Left_Tab
keycode  24 = q Q Cyrillic_shorti Cyrillic_SHORTI
keycode  25 = w W Cyrillic_tse Cyrillic_TSE
keycode  26 = e E Cyrillic_u Cyrillic_U
keycode  27 = r R Cyrillic_ka Cyrillic_KA
keycode  28 = t T Cyrillic_ie Cyrillic_IE
keycode  29 = y Y Cyrillic_en Cyrillic_EN
keycode  30 = u U Cyrillic_ghe Cyrillic_GHE
keycode  31 = i I Cyrillic_sha Cyrillic_SHA
keycode  32 = o O Cyrillic_shcha Cyrillic_SHCHA
keycode  33 = p P Cyrillic_ze Cyrillic_ZE
keycode  34 = bracketleft braceleft Cyrillic_ha Cyrillic_HA
keycode  35 = bracketright braceright Cyrillic_hardsign Cyrillic_HARDSIGN
keycode  36 = Return NoSymbol Return
keycode  37 = Control_L NoSymbol Control_L
keycode  38 = a A Cyrillic_ef Cyrillic_EF
keycode  39 = s S Cyrillic_yeru Cyrillic_YERU
keycode  40 = d D Cyrillic_ve Cyrillic_VE
keycode  41 = f F Cyrillic_a Cyrillic_A
keycode  42 = g G Cyrillic_pe Cyrillic_PE
keycode  43 = h H Cyrillic_er Cyrillic_ER
keycode  44 = j J Cyrillic_o Cyrillic_O
keycode  45 = k K Cyrillic_el Cyrillic_EL
keycode  46 = l L Cyrillic_de Cyrillic_DE
keycode  47 = semicolon colon Cyrillic_zhe Cyrillic_ZHE
keycode  48 = apostrophe quotedbl Cyrillic_e Cyrillic_E
keycode  49 = grave asciitilde Cyrillic_io Cyrillic_IO
keycode  50 = Shift_L NoSymbol Shift_L
keycode  51 = backslash bar backslash slash
keycode  52 = z Z Cyrillic_ya Cyrillic_YA
keycode  53 = x X Cyrillic_che Cyrillic_CHE
keycode  54 = c C Cyrillic_es Cyrillic_ES
keycode  55 = v V Cyrillic_em Cyrillic_EM
keycode  56 = b B Cyrillic_i Cyrillic_I
keycode  57 = n N Cyrillic_te Cyrillic_TE
keycode  58 = m M Cyrillic_softsign Cyrillic_SOFTSIGN
keycode  59 = comma less Cyrillic_be Cyrillic_BE
keycode  60 = period greater Cyrillic_yu Cyrillic_YU
keycode  61 = slash question period comma
keycode  62 = Shift_R NoSymbol Shift_R
keycode  63 = KP_Multiply KP_Multiply KP_Multiply KP_Multiply KP_Multiply KP_Multiply XF86ClearGrab KP_Multiply KP_Multiply XF86ClearGrab
keycode  64 = Alt_L Meta_L Alt_L Meta_L
keycode  65 = space ISO_Next_Group space ISO_Next_Group
keycode  66 = Caps_Lock NoSymbol Caps_Lock
keycode  67 = F1 F1 F1 F1 F1 F1 XF86Switch_VT_1 F1 F1 XF86Switch_VT_1
keycode  68 = F2 F2 F2 F2 F2 F2 XF86Switch_VT_2 F2 F2 XF86Switch_VT_2
keycode  69 = F3 F3 F3 F3 F3 F3 XF86Switch_VT_3 F3 F3 XF86Switch_VT_3
keycode  70 = F4 F4 F4 F4 F4 F4 XF86Switch_VT_4 F4 F4 XF86Switch_VT_4
keycode  71 = F5 F5 F5 F5 F5 F5 XF86Switch_VT_5 F5 F5 XF86Switch_VT_5
keycode  72 = F6 F6 F6 F6 F6 F6 XF86Switch_VT_6 F6 F6 XF86Switch_VT_6
keycode  73 = F7 F7 F7 F7 F7 F7 XF86Switch_VT_7 F7 F7 XF86Switch_VT_7
keycode  74 = F8 F8 F8 F8 F8 F8 XF86Switch_VT_8 F8 F8 XF86Switch_VT_8
keycode  75 = F9 F9 F9 F9 F9 F9 XF86Switch_VT_9 F9 F9 XF86Switch_VT_9
keycode  76 = F10 F10 F10 F10 F10 F10 XF86Switch_VT_10 F10 F10 XF86Switch_VT_10
keycode  77 = Num_Lock NoSymbol Num_Lock
keycode  78 = Scroll_Lock NoSymbol Scroll_Lock
keycode  79 = KP_Home KP_7 KP_Home KP_7
keycode  80 = KP_Up KP_8 KP_Up KP_8
keycode  81 = KP_Prior KP_9 KP_Prior KP_9
keycode  82 = KP_Subtract KP_Subtract KP_Subtract KP_Subtract KP_Subtract KP_Subtract XF86Prev_VMode KP_Subtract KP_Subtract XF86Prev_VMode
keycode  83 = KP_Left KP_4 KP_Left KP_4
keycode  84 = KP_Begin KP_5 KP_Begin KP_5
keycode  85 = KP_Right KP_6 KP_Right KP_6
keycode  86 = KP_Add KP_Add KP_Add KP_Add KP_Add KP_Add XF86Next_VMode KP_Add KP_Add XF86Next_VMode
keycode  87 = KP_End KP_1 KP_End KP_1
keycode  88 = KP_Down KP_2 KP_Down KP_2
keycode  89 = KP_Next KP_3 KP_Next KP_3
keycode  90 = KP_Insert KP_0 KP_Insert KP_0
keycode  91 = KP_Delete KP_Decimal KP_Delete KP_Separator
keycode  92 =
keycode  93 =
keycode  94 = less greater slash bar bar brokenbar
keycode  95 = F11 F11 F11 F11 F11 F11 XF86Switch_VT_11 F11 F11 XF86Switch_VT_11
keycode  96 = F12 F12 F12 F12 F12 F12 XF86Switch_VT_12 F12 F12 XF86Switch_VT_12
keycode  97 = Home NoSymbol Home
keycode  98 = Up NoSymbol Up
keycode  99 = Prior NoSymbol Prior
keycode 100 = Left NoSymbol Left
keycode 101 =
keycode 102 = Right NoSymbol Right
keycode 103 = End NoSymbol End
keycode 104 = Down NoSymbol Down
keycode 105 = Next NoSymbol Next
keycode 106 = Insert NoSymbol Insert
keycode 107 = Delete NoSymbol Delete
keycode 108 = KP_Enter NoSymbol KP_Enter
keycode 109 = Control_R NoSymbol Control_R
keycode 110 = Pause Break Pause Break
keycode 111 = Print Sys_Req Print Sys_Req
keycode 112 = KP_Divide KP_Divide KP_Divide KP_Divide KP_Divide KP_Divide XF86Ungrab KP_Divide KP_Divide XF86Ungrab
keycode 113 = Alt_R Meta_R Alt_R Meta_R
keycode 114 =
keycode 115 = Super_L NoSymbol Super_L
keycode 116 = Super_R NoSymbol Super_R
keycode 117 = Menu NoSymbol Menu
keycode 118 =
keycode 119 =
keycode 120 =
keycode 121 =
keycode 122 =
keycode 123 =
keycode 124 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift
keycode 125 = NoSymbol Alt_L NoSymbol Alt_L
keycode 126 = KP_Equal NoSymbol KP_Equal
keycode 127 = NoSymbol Super_L NoSymbol Super_L
keycode 128 = NoSymbol Hyper_L NoSymbol Hyper_L
keycode 129 =
keycode 130 =
keycode 131 =
keycode 132 =
keycode 133 =
keycode 134 = KP_Decimal KP_Decimal KP_Decimal KP_Decimal
keycode 135 =
keycode 136 =
keycode 137 =
keycode 138 =
keycode 139 =
keycode 140 =
keycode 141 =
keycode 142 =
keycode 143 =
keycode 144 = XF86AudioPrev NoSymbol XF86AudioPrev
keycode 145 =
keycode 146 =
keycode 147 =
keycode 148 =
keycode 149 =
keycode 150 = XF86Sleep NoSymbol XF86Sleep
keycode 151 =
keycode 152 =
keycode 153 = XF86AudioNext NoSymbol XF86AudioNext
keycode 154 =
keycode 155 =
keycode 156 = NoSymbol Meta_L NoSymbol Meta_L
keycode 157 =
keycode 158 =
keycode 159 =
keycode 160 = XF86AudioMute NoSymbol XF86AudioMute
keycode 161 = XF86Calculator NoSymbol XF86Calculator
keycode 162 = XF86AudioPlay XF86AudioPause XF86AudioPlay XF86AudioPause
keycode 163 =
keycode 164 = XF86AudioStop XF86Eject XF86AudioStop XF86Eject
keycode 165 =
keycode 166 =
keycode 167 =
keycode 168 =
keycode 169 =
keycode 170 = XF86Eject NoSymbol XF86Eject
keycode 171 =
keycode 172 =
keycode 173 =
keycode 174 = XF86AudioLowerVolume NoSymbol XF86AudioLowerVolume
keycode 175 =
keycode 176 = XF86AudioRaiseVolume NoSymbol XF86AudioRaiseVolume
keycode 177 =
keycode 178 = XF86WWW NoSymbol XF86WWW
keycode 179 =
keycode 180 =
keycode 181 =
keycode 182 =
keycode 183 =
keycode 184 =
keycode 185 =
keycode 186 =
keycode 187 =
keycode 188 =
keycode 189 =
keycode 190 =
keycode 191 =
keycode 192 =
keycode 193 =
keycode 194 =
keycode 195 =
keycode 196 =
keycode 197 =
keycode 198 =
keycode 199 =
keycode 200 =
keycode 201 =
keycode 202 =
keycode 203 =
keycode 204 = XF86Eject NoSymbol XF86Eject
keycode 205 =
keycode 206 =
keycode 207 =
keycode 208 = Hiragana_Katakana NoSymbol Hiragana_Katakana
keycode 209 = Hangul NoSymbol Hangul
keycode 210 = Hangul_Hanja NoSymbol Hangul_Hanja
keycode 211 =
keycode 212 =
keycode 213 =
keycode 214 = XF86Display NoSymbol XF86Display
keycode 215 = XF86KbdLightOnOff NoSymbol XF86KbdLightOnOff
keycode 216 = XF86KbdBrightnessDown NoSymbol XF86KbdBrightnessDown
keycode 217 = XF86KbdBrightnessUp NoSymbol XF86KbdBrightnessUp
keycode 218 =
keycode 219 =
keycode 220 =
keycode 221 =
keycode 222 = XF86PowerOff NoSymbol XF86PowerOff
keycode 223 = XF86Standby NoSymbol XF86Standby
keycode 224 =
keycode 225 =
keycode 226 =
keycode 227 = XF86WakeUp NoSymbol XF86WakeUp
keycode 228 =
keycode 229 = XF86Search NoSymbol XF86Search
keycode 230 = XF86Favorites NoSymbol XF86Favorites
keycode 231 = XF86Reload NoSymbol XF86Reload
keycode 232 = XF86Stop NoSymbol XF86Stop
keycode 233 = XF86Forward NoSymbol XF86Forward
keycode 234 = XF86Back NoSymbol XF86Back
keycode 235 = XF86MyComputer NoSymbol XF86MyComputer
keycode 236 = XF86Mail NoSymbol XF86Mail
keycode 237 = XF86AudioMedia NoSymbol XF86AudioMedia
keycode 238 =
keycode 239 =
keycode 240 =
keycode 241 =
keycode 242 =
keycode 243 =
keycode 244 = XF86Battery NoSymbol XF86Battery
keycode 245 =
keycode 246 = XF86WLAN NoSymbol XF86WLAN
keycode 247 =
keycode 248 =
keycode 249 =
keycode 250 =
keycode 251 =
keycode 252 =
keycode 253 =
keycode 254 =
keycode 255 =
  • Client
keycode   8 =
keycode   9 = Escape NoSymbol Escape
keycode  10 = 1 exclam 1 exclam
keycode  11 = 2 at 2 quotedbl
keycode  12 = 3 numbersign 3 numerosign
keycode  13 = 4 dollar 4 semicolon
keycode  14 = 5 percent 5 percent
keycode  15 = 6 asciicircum 6 colon
keycode  16 = 7 ampersand 7 question
keycode  17 = 8 asterisk 8 asterisk U20BD
keycode  18 = 9 parenleft 9 parenleft
keycode  19 = 0 parenright 0 parenright
keycode  20 = minus underscore minus underscore
keycode  21 = equal plus equal plus
keycode  22 = BackSpace BackSpace BackSpace BackSpace
keycode  23 = Tab ISO_Left_Tab Tab ISO_Left_Tab
keycode  24 = q Q Cyrillic_shorti Cyrillic_SHORTI
keycode  25 = w W Cyrillic_tse Cyrillic_TSE
keycode  26 = e E Cyrillic_u Cyrillic_U
keycode  27 = r R Cyrillic_ka Cyrillic_KA
keycode  28 = t T Cyrillic_ie Cyrillic_IE
keycode  29 = y Y Cyrillic_en Cyrillic_EN
keycode  30 = u U Cyrillic_ghe Cyrillic_GHE
keycode  31 = i I Cyrillic_sha Cyrillic_SHA
keycode  32 = o O Cyrillic_shcha Cyrillic_SHCHA
keycode  33 = p P Cyrillic_ze Cyrillic_ZE
keycode  34 = bracketleft braceleft Cyrillic_ha Cyrillic_HA
keycode  35 = bracketright braceright Cyrillic_hardsign Cyrillic_HARDSIGN
keycode  36 = Return NoSymbol Return
keycode  37 = Control_L NoSymbol Control_L
keycode  38 = a A Cyrillic_ef Cyrillic_EF
keycode  39 = s S Cyrillic_yeru Cyrillic_YERU
keycode  40 = d D Cyrillic_ve Cyrillic_VE
keycode  41 = f F Cyrillic_a Cyrillic_A
keycode  42 = g G Cyrillic_pe Cyrillic_PE
keycode  43 = h H Cyrillic_er Cyrillic_ER
keycode  44 = j J Cyrillic_o Cyrillic_O
keycode  45 = k K Cyrillic_el Cyrillic_EL
keycode  46 = l L Cyrillic_de Cyrillic_DE
keycode  47 = semicolon colon Cyrillic_zhe Cyrillic_ZHE
keycode  48 = apostrophe quotedbl Cyrillic_e Cyrillic_E
keycode  49 = grave asciitilde Cyrillic_io Cyrillic_IO
keycode  50 = Shift_L NoSymbol Shift_L
keycode  51 = backslash bar backslash slash
keycode  52 = z Z Cyrillic_ya Cyrillic_YA
keycode  53 = x X Cyrillic_che Cyrillic_CHE
keycode  54 = c C Cyrillic_es Cyrillic_ES
keycode  55 = v V Cyrillic_em Cyrillic_EM
keycode  56 = b B Cyrillic_i Cyrillic_I
keycode  57 = n N Cyrillic_te Cyrillic_TE
keycode  58 = m M Cyrillic_softsign Cyrillic_SOFTSIGN
keycode  59 = comma less Cyrillic_be Cyrillic_BE
keycode  60 = period greater Cyrillic_yu Cyrillic_YU
keycode  61 = slash question period comma
keycode  62 = Shift_R NoSymbol Shift_R
keycode  63 = KP_Multiply KP_Multiply KP_Multiply KP_Multiply KP_Multiply KP_Multiply XF86ClearGrab KP_Multiply KP_Multiply XF86ClearGrab
keycode  64 = Alt_L Meta_L Alt_L Meta_L
keycode  65 = space ISO_Next_Group space ISO_Next_Group
keycode  66 = Caps_Lock NoSymbol Caps_Lock
keycode  67 = F1 F1 F1 F1 F1 F1 XF86Switch_VT_1 F1 F1 XF86Switch_VT_1
keycode  68 = F2 F2 F2 F2 F2 F2 XF86Switch_VT_2 F2 F2 XF86Switch_VT_2
keycode  69 = F3 F3 F3 F3 F3 F3 XF86Switch_VT_3 F3 F3 XF86Switch_VT_3
keycode  70 = F4 F4 F4 F4 F4 F4 XF86Switch_VT_4 F4 F4 XF86Switch_VT_4
keycode  71 = F5 F5 F5 F5 F5 F5 XF86Switch_VT_5 F5 F5 XF86Switch_VT_5
keycode  72 = F6 F6 F6 F6 F6 F6 XF86Switch_VT_6 F6 F6 XF86Switch_VT_6
keycode  73 = F7 F7 F7 F7 F7 F7 XF86Switch_VT_7 F7 F7 XF86Switch_VT_7
keycode  74 = F8 F8 F8 F8 F8 F8 XF86Switch_VT_8 F8 F8 XF86Switch_VT_8
keycode  75 = F9 F9 F9 F9 F9 F9 XF86Switch_VT_9 F9 F9 XF86Switch_VT_9
keycode  76 = F10 F10 F10 F10 F10 F10 XF86Switch_VT_10 F10 F10 XF86Switch_VT_10
keycode  77 = Num_Lock NoSymbol Num_Lock
keycode  78 = Scroll_Lock NoSymbol Scroll_Lock
keycode  79 = KP_Home KP_7 KP_Home KP_7
keycode  80 = KP_Up KP_8 KP_Up KP_8
keycode  81 = KP_Prior KP_9 KP_Prior KP_9
keycode  82 = KP_Subtract KP_Subtract KP_Subtract KP_Subtract KP_Subtract KP_Subtract XF86Prev_VMode KP_Subtract KP_Subtract XF86Prev_VMode
keycode  83 = KP_Left KP_4 KP_Left KP_4
keycode  84 = KP_Begin KP_5 KP_Begin KP_5
keycode  85 = KP_Right KP_6 KP_Right KP_6
keycode  86 = KP_Add KP_Add KP_Add KP_Add KP_Add KP_Add XF86Next_VMode KP_Add KP_Add XF86Next_VMode
keycode  87 = KP_End KP_1 KP_End KP_1
keycode  88 = KP_Down KP_2 KP_Down KP_2
keycode  89 = KP_Next KP_3 KP_Next KP_3
keycode  90 = KP_Insert KP_0 KP_Insert KP_0
keycode  91 = KP_Delete KP_Decimal KP_Delete KP_Separator
keycode  92 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift
keycode  93 =
keycode  94 = less greater slash bar bar brokenbar
keycode  95 = F11 F11 F11 F11 F11 F11 XF86Switch_VT_11 F11 F11 XF86Switch_VT_11
keycode  96 = F12 F12 F12 F12 F12 F12 XF86Switch_VT_12 F12 F12 XF86Switch_VT_12
keycode  97 =
keycode  98 = Katakana NoSymbol Katakana
keycode  99 = Hiragana NoSymbol Hiragana
keycode 100 = Henkan_Mode NoSymbol Henkan_Mode
keycode 101 = Hiragana_Katakana NoSymbol Hiragana_Katakana
keycode 102 = Muhenkan NoSymbol Muhenkan
keycode 103 =
keycode 104 = KP_Enter NoSymbol KP_Enter
keycode 105 = Control_R NoSymbol Control_R
keycode 106 = KP_Divide KP_Divide KP_Divide KP_Divide KP_Divide KP_Divide XF86Ungrab KP_Divide KP_Divide XF86Ungrab
keycode 107 = Print Sys_Req Print Sys_Req
keycode 108 = Alt_R Meta_R Alt_R Meta_R
keycode 109 = Linefeed NoSymbol Linefeed
keycode 110 = Home NoSymbol Home
keycode 111 = Up NoSymbol Up
keycode 112 = Prior NoSymbol Prior
keycode 113 = Left NoSymbol Left
keycode 114 = Right NoSymbol Right
keycode 115 = End NoSymbol End
keycode 116 = Down NoSymbol Down
keycode 117 = Next NoSymbol Next
keycode 118 = Insert NoSymbol Insert
keycode 119 = Delete NoSymbol Delete
keycode 120 =
keycode 121 = XF86AudioMute NoSymbol XF86AudioMute
keycode 122 = XF86AudioLowerVolume NoSymbol XF86AudioLowerVolume
keycode 123 = XF86AudioRaiseVolume NoSymbol XF86AudioRaiseVolume
keycode 124 = XF86PowerOff NoSymbol XF86PowerOff
keycode 125 = KP_Equal NoSymbol KP_Equal
keycode 126 = plusminus NoSymbol plusminus
keycode 127 = Pause Break Pause Break
keycode 128 = XF86LaunchA NoSymbol XF86LaunchA
keycode 129 = KP_Decimal KP_Decimal KP_Decimal KP_Decimal
keycode 130 = Hangul NoSymbol Hangul
keycode 131 = Hangul_Hanja NoSymbol Hangul_Hanja
keycode 132 =
keycode 133 = Super_L NoSymbol Super_L
keycode 134 = Super_R NoSymbol Super_R
keycode 135 = Menu NoSymbol Menu
keycode 136 = Cancel NoSymbol Cancel
keycode 137 = Redo NoSymbol Redo
keycode 138 = SunProps NoSymbol SunProps
keycode 139 = Undo NoSymbol Undo
keycode 140 = SunFront NoSymbol SunFront
keycode 141 = XF86Copy NoSymbol XF86Copy
keycode 142 = XF86Open NoSymbol XF86Open
keycode 143 = XF86Paste NoSymbol XF86Paste
keycode 144 = Find NoSymbol Find
keycode 145 = XF86Cut NoSymbol XF86Cut
keycode 146 = Help NoSymbol Help
keycode 147 = XF86MenuKB NoSymbol XF86MenuKB
keycode 148 = XF86Calculator NoSymbol XF86Calculator
keycode 149 =
keycode 150 = XF86Sleep NoSymbol XF86Sleep
keycode 151 = XF86WakeUp NoSymbol XF86WakeUp
keycode 152 = XF86Explorer NoSymbol XF86Explorer
keycode 153 = XF86Send NoSymbol XF86Send
keycode 154 =
keycode 155 = XF86Xfer NoSymbol XF86Xfer
keycode 156 = XF86Launch1 NoSymbol XF86Launch1
keycode 157 = XF86Launch2 NoSymbol XF86Launch2
keycode 158 = XF86WWW NoSymbol XF86WWW
keycode 159 = XF86DOS NoSymbol XF86DOS
keycode 160 = XF86ScreenSaver NoSymbol XF86ScreenSaver
keycode 161 = XF86RotateWindows NoSymbol XF86RotateWindows
keycode 162 = XF86TaskPane NoSymbol XF86TaskPane
keycode 163 = XF86Mail NoSymbol XF86Mail
keycode 164 = XF86Favorites NoSymbol XF86Favorites
keycode 165 = XF86MyComputer NoSymbol XF86MyComputer
keycode 166 = XF86Back NoSymbol XF86Back
keycode 167 = XF86Forward NoSymbol XF86Forward
keycode 168 =
keycode 169 = XF86Eject NoSymbol XF86Eject
keycode 170 = XF86Eject NoSymbol XF86Eject
keycode 171 = XF86AudioNext NoSymbol XF86AudioNext
keycode 172 = XF86AudioPlay XF86AudioPause XF86AudioPlay XF86AudioPause
keycode 173 = XF86AudioPrev NoSymbol XF86AudioPrev
keycode 174 = XF86AudioStop XF86Eject XF86AudioStop XF86Eject
keycode 175 = XF86AudioRecord NoSymbol XF86AudioRecord
keycode 176 = XF86AudioRewind NoSymbol XF86AudioRewind
keycode 177 = XF86Phone NoSymbol XF86Phone
keycode 178 =
keycode 179 = XF86Tools NoSymbol XF86Tools
keycode 180 = XF86HomePage NoSymbol XF86HomePage
keycode 181 = XF86Reload NoSymbol XF86Reload
keycode 182 = XF86Close NoSymbol XF86Close
keycode 183 =
keycode 184 =
keycode 185 = XF86ScrollUp NoSymbol XF86ScrollUp
keycode 186 = XF86ScrollDown NoSymbol XF86ScrollDown
keycode 187 = parenleft NoSymbol parenleft
keycode 188 = parenright NoSymbol parenright
keycode 189 = XF86New NoSymbol XF86New
keycode 190 = Redo NoSymbol Redo
keycode 191 = XF86Tools NoSymbol XF86Tools
keycode 192 = XF86Launch5 NoSymbol XF86Launch5
keycode 193 = XF86Launch6 NoSymbol XF86Launch6
keycode 194 = XF86Launch7 NoSymbol XF86Launch7
keycode 195 = XF86Launch8 NoSymbol XF86Launch8
keycode 196 = XF86Launch9 NoSymbol XF86Launch9
keycode 197 =
keycode 198 = XF86AudioMicMute NoSymbol XF86AudioMicMute
keycode 199 = XF86TouchpadToggle NoSymbol XF86TouchpadToggle
keycode 200 = XF86TouchpadOn NoSymbol XF86TouchpadOn
keycode 201 = XF86TouchpadOff NoSymbol XF86TouchpadOff
keycode 202 =
keycode 203 = ISO_Level5_Shift NoSymbol ISO_Level5_Shift
keycode 204 = NoSymbol Alt_L NoSymbol Alt_L
keycode 205 = NoSymbol Meta_L NoSymbol Meta_L
keycode 206 = NoSymbol Super_L NoSymbol Super_L
keycode 207 = NoSymbol Hyper_L NoSymbol Hyper_L
keycode 208 = XF86AudioPlay NoSymbol XF86AudioPlay
keycode 209 = XF86AudioPause NoSymbol XF86AudioPause
keycode 210 = XF86Launch3 NoSymbol XF86Launch3
keycode 211 = XF86Launch4 NoSymbol XF86Launch4
keycode 212 = XF86LaunchB NoSymbol XF86LaunchB
keycode 213 = XF86Suspend NoSymbol XF86Suspend
keycode 214 = XF86Close NoSymbol XF86Close
keycode 215 = XF86AudioPlay NoSymbol XF86AudioPlay
keycode 216 = XF86AudioForward NoSymbol XF86AudioForward
keycode 217 =
keycode 218 = Print NoSymbol Print
keycode 219 =
keycode 220 = XF86WebCam NoSymbol XF86WebCam
keycode 221 = XF86AudioPreset NoSymbol XF86AudioPreset
keycode 222 =
keycode 223 = XF86Mail NoSymbol XF86Mail
keycode 224 = XF86Messenger NoSymbol XF86Messenger
keycode 225 = XF86Search NoSymbol XF86Search
keycode 226 = XF86Go NoSymbol XF86Go
keycode 227 = XF86Finance NoSymbol XF86Finance
keycode 228 = XF86Game NoSymbol XF86Game
keycode 229 = XF86Shop NoSymbol XF86Shop
keycode 230 =
keycode 231 = Cancel NoSymbol Cancel
keycode 232 = XF86MonBrightnessDown NoSymbol XF86MonBrightnessDown
keycode 233 = XF86MonBrightnessUp NoSymbol XF86MonBrightnessUp
keycode 234 = XF86AudioMedia NoSymbol XF86AudioMedia
keycode 235 = XF86Display NoSymbol XF86Display
keycode 236 = XF86KbdLightOnOff NoSymbol XF86KbdLightOnOff
keycode 237 = XF86KbdBrightnessDown NoSymbol XF86KbdBrightnessDown
keycode 238 = XF86KbdBrightnessUp NoSymbol XF86KbdBrightnessUp
keycode 239 = XF86Send NoSymbol XF86Send
keycode 240 = XF86Reply NoSymbol XF86Reply
keycode 241 = XF86MailForward NoSymbol XF86MailForward
keycode 242 = XF86Save NoSymbol XF86Save
keycode 243 = XF86Documents NoSymbol XF86Documents
keycode 244 = XF86Battery NoSymbol XF86Battery
keycode 245 = XF86Bluetooth NoSymbol XF86Bluetooth
keycode 246 = XF86WLAN NoSymbol XF86WLAN
keycode 247 = XF86UWB NoSymbol XF86UWB
keycode 248 =
keycode 249 = XF86Next_VMode NoSymbol XF86Next_VMode
keycode 250 = XF86Prev_VMode NoSymbol XF86Prev_VMode
keycode 251 = XF86MonBrightnessCycle NoSymbol XF86MonBrightnessCycle
keycode 252 = XF86BrightnessAuto NoSymbol XF86BrightnessAuto
keycode 253 = XF86DisplayOff NoSymbol XF86DisplayOff
keycode 254 = XF86WWAN NoSymbol XF86WWAN
keycode 255 = XF86RFKill NoSymbol XF86RFKill
  1. xmodmap -pm
  • Server
xmodmap:  up to 4 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Control_R (0x6d)
mod1        Alt_L (0x40),  Alt_R (0x71),  Alt_L (0x7d),  Meta_L (0x9c)
mod2        Num_Lock (0x4d)
mod3        ISO_Level5_Shift (0x8)
mod4        Super_L (0x73),  Super_R (0x74),  Super_L (0x7f),  Hyper_L (0x80)
mod5        ISO_Level3_Shift (0x7c)

  • Client
xmodmap:  up to 4 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Control_R (0x69)
mod1        Alt_L (0x40),  Alt_R (0x6c),  Alt_L (0xcc),  Meta_L (0xcd)
mod2        Num_Lock (0x4d)
mod3        ISO_Level5_Shift (0xcb)
mod4        Super_L (0x85),  Super_R (0x86),  Super_L (0xce),  Hyper_L (0xcf)
mod5        ISO_Level3_Shift (0x5c)
  1. xkbprint -label name $DISPLAY
  • Server: nothing
  1. -d keyboard Pressed: 'a','b','c','Ctrl','Space','Ctrl+Space','Caps Lock'
@V-ctor V-ctor added the bug Something isn't working label Dec 16, 2024
@V-ctor
Copy link
Author

V-ctor commented Dec 17, 2024

I found the way to switch by console commands with preparation. But still I can't switch by keys combination.

setxkbmap -layout 'us,ru' -model pc105 -option 'grp:ctrl_space_toggle'
loadkeys ru
setxkbmap ru

So does it mean that issue with X session settings?

@totaam
Copy link
Collaborator

totaam commented Dec 18, 2024

AFAICT, that's a limitation of Wayland clients.
Running xmodmap on the client is meaningless as the xpra client goes through GTK, which will use native wayland bindings.
If Wayland doesn't fire the layout-changed signal when the layout is changed, there's nothing we can do.
And even if it does, the limited keymap support from Wayland may still hinder it.

You could run the xpra client with the X11 backend to see if that helps: GDK_BACKEND=x11 xpra attach ...

@V-ctor
Copy link
Author

V-ctor commented Dec 18, 2024

GDK_BACKEND=x11 doesn't help.
Is there anything we can do? NoMachine, x2go, xRDP work quite well in terms of switching layouts.
Can we tune Wayland client? I'm not proficient in Python but I can take a look. I'd appreciate any tips.

@totaam
Copy link
Collaborator

totaam commented Dec 18, 2024

You can run the client with -d keyboard and see what is detected when you switch layout, then take it from there.

@V-ctor
Copy link
Author

V-ctor commented Dec 18, 2024

I did it. And as far as I can see all keys detected properly.
By the way, I didn't say that my keys combination for server (Ctrl+Space) is not my local switching (Caps Lock). I faced such issue with NoMachine that local switching doesn't propagate to server and set up another (Ctrl+Space), acceptable trade off.
And I see by xev that server obtains both (Ctrl+Space). More over when I emulate such key press (on server) by xdotool key ctrl+cpace it does nothing as well as xte 'keydown Control_L' 'key space' 'keyup Control_L'. But at least xte switches layout in NoMachine.
So how does it work? I thought that it is enough to send keys directly to server and server processes it as it was set up. But it does not. Or client should send special event/signal of layout changing to server?

@V-ctor
Copy link
Author

V-ctor commented Dec 18, 2024

Ha I just set up rshift_tggle and it kinda works but only when I hold right shift. Looks like it behaves not as toggle but as switch but some progress.

@totaam
Copy link
Collaborator

totaam commented Dec 18, 2024

I did it. And as far as I can see all keys detected properly.

It's not the keys that I expected to see. I was hoping there would be a layout-change event telling xpra to change the keymap at that point.

local switching doesn't propagate to server and set up another...

I don't see how the server would have configured x11 layout switching unless you configured that yourself manually.
Wayland clients do not have the ability to determine the exact keyboard configuration, and no idea at all about X11 layout switching configuration.

Or client should send special event/signal of layout changing to server?

With X11 clients (and depending on the exact configuration), the layout change can be detected as an X11 event, it is then forwarded to the server which then mirrors it.

@V-ctor
Copy link
Author

V-ctor commented Dec 18, 2024

I'm working on dirty hack 😀: installed sxhkdrc and made a hook for ctrl+space, hook changing locale by switching
setxkbmap -layout 'us' / setxkbmap -layout 'ru'. And it works. But before it can switch we have to set up keyboard model by setxkbmap -model pc105. And I stuck here. Nothing works. Tried xpra attach ssh://victor@X/Y --start-child="/usr/bin/setxkbmap -model pc105". Nothing in log I see

started command `/usr/bin/setxkbmap -model pc105` with pid 318529.[0m
wrote pid 318529 to '/run/user/1002/xpra/49/setxkbmap.pid'.[0m
child '/usr/bin/setxkbmap' with pid 318529 has terminated.[0m
setting keymap: layout=us,ru.

Looks like xpra override keyboard settings that were set up by setxkbmap
But if I launch konsole and execute there, then ok. I can switch layout.

@totaam
Copy link
Collaborator

totaam commented Dec 18, 2024

Yes, the first thing xpra does when you connect is to setup the keyboard.
What may work is --start-after-connect.

@totaam
Copy link
Collaborator

totaam commented Dec 18, 2024

A better way would be to use xpra --keyboard-options=whatever

@V-ctor
Copy link
Author

V-ctor commented Dec 18, 2024

What may work is --start-after-connect.

Is this for server ? I tried it as well, didn't work.

A better way would be to use xpra --keyboard-options=whatever

Hmmm I thought that here we can set only options like we do in for setxkbmap How would be proper to set model?
--keyboard-options="-model pc105"?

@V-ctor
Copy link
Author

V-ctor commented Dec 18, 2024

With X11 clients (and depending on the exact configuration), the layout change can be detected as an X11 event, it is then forwarded to the server which then mirrors it.

Is there a way to emulate this event?

@totaam
Copy link
Collaborator

totaam commented Dec 18, 2024

How would be proper to set model?

The client can supply it:

xpra/xpra/x11/xkbhelper.py

Lines 65 to 101 in a98ab0d

def do_set_keymap(layout: str, variant: str, options, query_struct) -> None:
"""
layout is the generic layout name (used on non posix platforms)
defaults to `us`
variant is the layout variant (optional)
query_struct is the output of `setxkbmap -query` on the client
parsed into a dictionary
Use those to try to set up the correct keyboard map for the client
so that all the keycodes sent will be mapped
"""
# First we try to use data from setxkbmap -query,
# preferably as structured data:
query_struct = typedict(query_struct)
if query_struct:
log("do_set_keymap using xkbmap_query struct=%s", query_struct)
# The query_struct data will look something like this:
# {
# b"rules" : b"evdev",
# b"model" : b"pc105",
# b"layout" : b"gb",
# b"options" : b"grp:shift_caps_toggle",
# }
# parse the data into a dict:
rules = query_struct.strget("rules")
model = query_struct.strget("model")
layout = query_struct.strget("layout")
variant = query_struct.strget("variant")
options = query_struct.strget("options")
if layout:
log.info("setting keymap: %s",
csv(f"{std(k)}={std(v)}" for k, v in query_struct.items()
if k in ("rules", "model", "layout", "variant", "options") and v))
if safe_setxkbmap(rules, model, layout, variant, options):
return
else:
if safe_setxkbmap(rules, model, "", "", ""):
return

Is there a way to emulate this event?

The system tray keyboard layout menu kinda does.

@V-ctor
Copy link
Author

V-ctor commented Dec 18, 2024

The client can supply it:

Looks interesting. I'll try to understand how it works.

The system tray keyboard layout menu kinda does.

How to get it in seamless mode?

@V-ctor
Copy link
Author

V-ctor commented Dec 18, 2024

This works:
xpra attach ssh://victor@X/Y --start-child="sh -c 'sleep 10 && setxkbmap -model pc105'"
Sorry for my laziness and probably I'm using not the best way, but I've spent a lot of time trying to get this to work and I still have some issues to work around.
So if someone else runs into this issue there is a work around it. I still believe it's worth it.

totaam added a commit that referenced this issue Dec 23, 2024
@totaam
Copy link
Collaborator

totaam commented Dec 23, 2024

FWIW, with my X11 client, the server does this:

setting keymap: rules=evdev, model=pc105inet, layout=gb,gb

Connecting from a Wayland client, the keyboard detection is much more limited and shows:

setting keymap: layout=gb

As of commit 0a43ed8, I can now also change the default layout on the server:

XKB_DEFAULT_MODEL=pc105 xpra start --start=xterm

And then I get:

setting keymap: model=pc105, layout=gb

And with 89263b3, you can now also do the same from the client:

xpra attach --keyboard-model=pc105

Does that help?
Is pc105 is a more sensible default value?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working keyboard linux
Projects
None yet
Development

No branches or pull requests

2 participants