xpra icon
Bug tracker and wiki

Opened 5 months ago

Closed 5 weeks ago

#1898 closed defect (worksforme)

Bad keyboard mapping - French and Belgian layout - Some bad special characters

Reported by: jeanj4ck Owned by: jeanj4ck
Priority: major Milestone: 2.4
Component: html5 Version: 2.3.x
Keywords: bad keyboard layout (FR/BE) Cc:

Description

Hi guys,

First thanks for your amazing work !

I noted a strange behaviors of XPRA when I tried to access to my stuff through the HTML module.

I can confirm the following observations using different clients running on Linux, Windows 10 and Mac OS.
I am not able to write the following special characters when I use the Belgian keyboard layout.

I noted also a variant of this issue with the french keyboard layout. I can provide more information if it help you :)

Example (Belgian keyboard layout) :

Char Status
é ko
§ ko
è ko
ç ko
à ko

I have also problems with the characters that require the usage of the "Alt gr" key:

Char Status (if replaced by another char)
| ko &
@ ko a
# ko "
{ ko
} ko

XPRA current configuration :

# xpra showconfig  | grep used

av-sync               (used)   = False                             <type 'bool'>
bandwidth-limit       (used)   = '80Mbps'                          <type 'str'>
compression_level     (used)   = 9                                 <type 'int'>
dpi                   (used)   = 1                                 <type 'int'>
encoding              (used)   = 'jpeg'                            <type 'str'>
encodings             (used)   = 'jpeg'                            <type 'list'>
file-transfer         (used)   = 'no'                              <type 'str'>
html                  (used)   = 'yes'                             <type 'str'>
keyboard-layout       (used)   = 'be'                              <type 'str'>
keyboard-raw          (used)   = True (I also tried with "no")     <type 'bool'>
mdns                  (used)   = False                             <type 'bool'>
microphone            (used)   = 'disabled'                        <type 'str'>
min-quality           (used)   = 60                                <type 'int'>
min-speed             (used)   = 0                                 <type 'int'>
open-files            (used)   = 'no'                              <type 'str'>
pdf-printer           (used)   = ''                                <type 'str'>
pixel-depth           (used)   = 16                                <type 'int'>
postscript-printer    (used)   = 'drv:///sample.drv/generic.ppd'   <type 'str'>
printing              (used)   = 'no'                              <type 'str'>
pulseaudio            (used)   = False                             <type 'bool'>
pulseaudio-command    (used)   = 'pulseaudio --start -n --daemonize=false --system=false --exit-idle-time=-1 --load=module-suspend-on-idle '--load=module-null-sink sink_name="Xpra-Speaker" sink_properties=device.description="Xpra\ Speaker"' '--load=module-null-sink sink_name="Xpra-Microphone" sink_properties=device.description="Xpra\ Microphone"' '--load=module-native-protocol-unix socket=$XPRA_PULSE_SERVER' --load=module-dbus-protocol --load=module-x11-publish --log-level=2 --log-target=stderr'  <type 'str'>
quality               (used)   = 90                                <type 'int'>
sharing               (used)   = False                             <type 'bool'>
shortcut-modifiers    (used)   = 'None'                            <type 'str'>
sound-source          (used)   = 'auto'                            <type 'str'>
speaker               (used)   = 'disabled'                        <type 'str'>
system-tray           (used)   = False                             <type 'bool'>
tray                  (used)   = False                             <type 'bool'>
video-scaling         (used)   = 0                                 <type 'int'>
webcam                (used)   = 'no'                              <type 'str'>
xvfb                  (used)   = 'Xvfb +extension GLX +extension Composite -screen 0 5760x2560x24+32 -dpi 1 -nolisten tcp -noreset -auth $XAUTHORITY'  <type 'str'>


XPRA current version

# xpra version 
2.3.2-r19729

I tried to force a mapping change with the following command and configuration file but the problem persist :

# xmodmap ./.Xmodmap

# cat .Xmodmap 

clear mod1 
clear mod2 
clear mod3 
clear mod4 
clear mod5 

add Mod1 = Alt_L
add Mod1 = Meta_L 
add Mod2 = Num_Lock
add Mod4 = Super_L Super_R Hyper_L
add Mod5 = ISO_Level3_Shift Mode_switch

keycode   8 =
keycode   9 = Escape NoSymbol Escape
keycode  10 = ampersand 1 ampersand 1 bar exclamdown bar
keycode  11 = eacute 2 eacute 2 at oneeighth at
keycode  12 = quotedbl 3 quotedbl 3 numbersign sterling numbersign
keycode  13 = apostrophe 4 apostrophe 4 onequarter dollar onequarter
keycode  14 = parenleft 5 parenleft 5 onehalf threeeighths onehalf
keycode  15 = section 6 section 6 asciicircum fiveeighths asciicircum
keycode  16 = egrave 7 egrave 7 braceleft seveneighths braceleft
keycode  17 = exclam 8 exclam 8 bracketleft trademark bracketleft
keycode  18 = ccedilla 9 ccedilla 9 braceleft plusminus braceleft
keycode  19 = agrave 0 agrave 0 braceright degree braceright
keycode  20 = parenright degree parenright degree backslash questiondown backslash
keycode  21 = minus underscore minus underscore dead_cedilla dead_ogonek dead_cedilla
keycode  22 = BackSpace BackSpace BackSpace BackSpace
keycode  23 = Tab ISO_Left_Tab Tab ISO_Left_Tab
keycode  24 = a A a A at Greek_OMEGA at
keycode  25 = z Z z Z lstroke Lstroke lstroke
keycode  26 = e E e E EuroSign cent EuroSign
keycode  27 = r R r R paragraph registered paragraph
keycode  28 = t T t T tslash Tslash tslash
keycode  29 = y Y y Y leftarrow yen leftarrow
keycode  30 = u U u U downarrow uparrow downarrow
keycode  31 = i I i I rightarrow idotless rightarrow
keycode  32 = o O o O oe OE oe
keycode  33 = p P p P thorn THORN thorn
keycode  34 = dead_circumflex dead_diaeresis dead_circumflex dead_diaeresis bracketleft dead_abovering bracketleft
keycode  35 = dollar asterisk dollar asterisk bracketright dead_macron bracketright
keycode  36 = Return NoSymbol Return
keycode  37 = Control_L NoSymbol Control_L
keycode  38 = q Q q Q ae AE ae
keycode  39 = s S s S ssharp section ssharp
keycode  40 = d D d D eth ETH eth
keycode  41 = f F f F dstroke ordfeminine dstroke
keycode  42 = g G g G eng ENG eng
keycode  43 = h H h H hstroke Hstroke hstroke
keycode  44 = j J j J dead_hook dead_horn dead_hook
keycode  45 = k K k K kra ampersand kra
keycode  46 = l L l L lstroke Lstroke lstroke
keycode  47 = m M m M dead_acute dead_doubleacute dead_acute
keycode  48 = ugrave percent ugrave percent dead_acute dead_caron dead_acute
keycode  49 = twosuperior threesuperior twosuperior threesuperior notsign notsign notsign
keycode  50 = Shift_L NoSymbol Shift_L
keycode  51 = mu sterling mu sterling dead_grave dead_breve dead_grave
keycode  52 = w W w W guillemotleft less guillemotleft
keycode  53 = x X x X guillemotright greater guillemotright
keycode  54 = c C c C cent copyright cent
keycode  55 = v V v V leftdoublequotemark leftsinglequotemark leftdoublequotemark
keycode  56 = b B b B rightdoublequotemark rightsinglequotemark rightdoublequotemark
keycode  57 = n N n N n N n
keycode  58 = comma question comma question dead_cedilla masculine dead_cedilla
keycode  59 = semicolon period semicolon period horizconnector multiply horizconnector
keycode  60 = colon slash colon slash periodcentered division periodcentered
keycode  61 = equal plus equal plus dead_tilde dead_abovedot dead_tilde
keycode  62 = Shift_R NoSymbol Shift_R
keycode  63 = KP_Multiply KP_Multiply KP_Multiply KP_Multiply KP_Multiply KP_Multiply XF86ClearGrab
keycode  64 = Alt_L Meta_L Alt_L Meta_L
keycode  65 = space NoSymbol space
keycode  66 = Caps_Lock NoSymbol Caps_Lock
keycode  67 = F1 F1 F1 F1 F1 F1 XF86Switch_VT_1
keycode  68 = F2 F2 F2 F2 F2 F2 XF86Switch_VT_2
keycode  69 = F3 F3 F3 F3 F3 F3 XF86Switch_VT_3
keycode  70 = F4 F4 F4 F4 F4 F4 XF86Switch_VT_4
keycode  71 = F5 F5 F5 F5 F5 F5 XF86Switch_VT_5
keycode  72 = F6 F6 F6 F6 F6 F6 XF86Switch_VT_6
keycode  73 = F7 F7 F7 F7 F7 F7 XF86Switch_VT_7
keycode  74 = F8 F8 F8 F8 F8 F8 XF86Switch_VT_8
keycode  75 = F9 F9 F9 F9 F9 F9 XF86Switch_VT_9
keycode  76 = F10 F10 F10 F10 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
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
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_Decimal
keycode  92 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift
keycode  93 =
keycode  94 = less greater less greater backslash backslash backslash
keycode  95 = F11 F11 F11 F11 F11 F11 XF86Switch_VT_11
keycode  96 = F12 F12 F12 F12 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
keycode 107 = Print Sys_Req Print Sys_Req
keycode 108 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift
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 XF86Eject XF86Eject 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 = Mode_switch NoSymbol Mode_switch
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 =
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 =
keycode 248 =
keycode 249 =
keycode 250 =
keycode 251 =
keycode 252 =
keycode 253 =
keycode 254 =
keycode 255 =

FYI, result after apply the xmodmap configuration :

# xmodmap 
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_L (0xcc),  Meta_L (0xcd)
mod2        Num_Lock (0x4d)
mod3      
mod4        Super_L (0x85),  Super_R (0x86),  Super_L (0xce),  Hyper_L (0xcf)
mod5        ISO_Level3_Shift (0x5c),  ISO_Level3_Shift (0x6c),  Mode_switch (0xcb)

Keyboard layout details :

Attachments (5)

xpra.showconfig (9.1 KB) - added by jeanj4ck 5 months ago.
xpra show config with default configuration files
xpra.info (98.0 KB) - added by jeanj4ck 5 months ago.
xpra info
xmodmap-pm (491 bytes) - added by jeanj4ck 5 months ago.
xmodmap -pm output
xmodmap-pke (11.1 KB) - added by jeanj4ck 5 months ago.
xmodmap -pke
logs (182.0 KB) - added by jeanj4ck 5 months ago.
xpra -d keyboard

Download all attachments as: .zip

Change History (12)

comment:1 Changed 5 months ago by Antoine Martin

Milestone: 2.4
Owner: changed from Antoine Martin to jeanj4ck
Priority: criticalmajor

Why do you modify so many settings from the default config?
Quite a few of them are wrong too:

  • compression_level should be left alone and has almost no effect with the html5 client
  • dpi value is invalid

etc

Please also attach your server log and specify your server OS in full.

Changed 5 months ago by jeanj4ck

Attachment: xpra.showconfig added

xpra show config with default configuration files

Changed 5 months ago by jeanj4ck

Attachment: xpra.info added

xpra info

Changed 5 months ago by jeanj4ck

Attachment: xmodmap-pm added

xmodmap -pm output

Changed 5 months ago by jeanj4ck

Attachment: xmodmap-pke added

xmodmap -pke

Changed 5 months ago by jeanj4ck

Attachment: logs added

xpra -d keyboard

comment:2 Changed 5 months ago by jeanj4ck

Hi Antoine,

Well I just attached all the log files to the ticket.

Following your advice I used the XPRA used the default configuration files
There is no changes, I experimented the same issues

Additional, my XPRA server (2.3.2-r19729) is running on Debian 9.4

Thanks,

Last edited 5 months ago by jeanj4ck (previous) (diff)

comment:3 Changed 4 months ago by Antoine Martin

Owner: changed from jeanj4ck to Antoine Martin
Status: newassigned

See also #1902

comment:4 Changed 8 weeks ago by Antoine Martin

Very likely to be resolved by r20530, see ticket:1870#comment:4

comment:5 Changed 8 weeks ago by Antoine Martin

Using:
https://upload.wikimedia.org/wikipedia/commons/4/41/Belgian_pc_keyboard.svg
(Belgian pc keyboard layout) or the French one, I can produce all the regular keys with 2.4 (likely fixed by #1902).

There is a problem with AltGr keys however, but only with mswindows clients - Linux clients work fine (possibly better than before since #1902 got merged).
That's because that's how things "work" on mswindows.
And if you think that handling the keyboard with an HTML5 client should be easy, just have a look at this unbelievable mess: getModifierState.

Looks like we may still be able to distinguish Alt + Control from AltGr, at least using chrome:

2018-09-26 11:10:45,823 client keyboard key-action,1,Alt_R,true,mod2,18,altgraph,18,0

See Detect Alt Gr (Alt Graph) modifier on key press.

We probably need something similar to r1779 (done 6 years ago for mswindows python client).
What's worse here is that things seem to get wedged and after unpressing the key the keyboard state is inconsistent.

Here for "3" which should give us a single "#", we see (raw):

2018-09-26 11:54:22,282 client keyboard processKeyEvent( true ,  [object KeyboardEvent] ) key= ControlLeft keycode= 17
2018-09-26 11:54:22,282 client keyboard passing clipboard modifier key event to browser: Control_L
2018-09-26 11:54:22,282 client keyboard processKeyEvent( true ,  [object KeyboardEvent] ) key= AltRight keycode= 18
2018-09-26 11:54:22,283 client keyboard key-action,1,Control_L,true,control,mod2,17,control,17,0
2018-09-26 11:54:22,283 set_keyboard_layout_group(0) config=KeyboardConfig(gb / None / None), current keyboard group=0
2018-09-26 11:54:22,283 get_keycode(17, Control_L, ('control', 'mod2'))=37 (level=0)
2018-09-26 11:54:22,283 client keyboard key-action,1,Alt_R,true,mod2,18,altgraph,18,0
2018-09-26 11:54:22,283 process_key_action(['key-action', 1, 'Control_L', 1, ['control', 'mod2'], 17, 'control', 17, 0]) server keycode=37
2018-09-26 11:54:22,283 filtered_modifiers_set(['mod2'])=set(['mod2'])
2018-09-26 11:54:22,283 modifier 'control' ignored (in ignored keynames=set(['Control_L', 'Control_R']))
2018-09-26 11:54:22,283 filtered_modifiers_set(('control', 'mod2'))=set(['mod2'])
2018-09-26 11:54:22,283 handle_key(1,1,Control_L,17,37,('control', 'mod2')) keyboard_sync=True
2018-09-26 11:54:22,283 handle keycode pressing    37: key 'Control_L'
2018-09-26 11:54:22,283 fake_key(37, True)
2018-09-26 11:54:22,283 set_keyboard_layout_group(0) config=KeyboardConfig(gb / None / None), current keyboard group=0
2018-09-26 11:54:22,283 get_keycode(18, Alt_R, ('mod2',))=253 (level=0)
2018-09-26 11:54:22,283 process_key_action(['key-action', 1, 'Alt_R', 1, ['mod2'], 18, 'altgraph', 18, 0]) server keycode=253
2018-09-26 11:54:22,284 filtered_modifiers_set(['control', 'mod2'])=set(['control', 'mod2'])
2018-09-26 11:54:22,284 filtered_modifiers_set(('mod2',))=set(['mod2'])
2018-09-26 11:54:22,284 make_keymask_match(('mod2',)) current mask: set(['control', 'mod2']), wanted: set(['mod2']), ignoring=253/['Alt_R'], keys_pressed={50: 'Shift_L', 51: 'numbersign'}
2018-09-26 11:54:22,284 keynames(control)=set(['Control_L', 'Control_R']), keycodes=[37, 105], nuisance=False, nuisance keys=set(['lock', 'mod2'])
2018-09-26 11:54:22,284 change_mask(remove) ('mod2',) modifier 'control' using keycode 37
2018-09-26 11:54:22,284 change_mask(set(['control']), False, remove) failed=[]
2018-09-26 11:54:22,284 change_mask(set([]), True, add) failed=[]
2018-09-26 11:54:22,284 handle_key(1,1,Alt_R,18,253,('mod2',)) keyboard_sync=True
2018-09-26 11:54:22,284 handle keycode pressing   253: key 'Alt_R'
2018-09-26 11:54:22,284 fake_key(253, True)
2018-09-26 11:54:22,479 client keyboard processKeyEvent( true ,  [object KeyboardEvent] ) key= Digit3 keycode= 51
2018-09-26 11:54:22,480 client keyboard key-action,1,numbersign,true,mod2,51,#,51,0
2018-09-26 11:54:22,481 set_keyboard_layout_group(0) config=KeyboardConfig(gb / None / None), current keyboard group=0
2018-09-26 11:54:22,481 get_keycode(51, numbersign, ('mod2',))=51 (level=0)
2018-09-26 11:54:22,481 process_key_action(['key-action', 1, 'numbersign', 1, ['mod2'], 51, '#', 51, 0]) server keycode=51
2018-09-26 11:54:22,482 filtered_modifiers_set(['mod1', 'mod2'])=set(['mod1', 'mod2'])
2018-09-26 11:54:22,482 filtered_modifiers_set(('mod2',))=set(['mod2'])
2018-09-26 11:54:22,482 make_keymask_match(('mod2',)) current mask: set(['mod1', 'mod2']), wanted: set(['mod2']), ignoring=51/['numbersign'], keys_pressed={50: 'Shift_L', 51: 'numbersign'}
2018-09-26 11:54:22,483 keynames(mod1)=set(['Meta_R', 'Alt_R', 'Meta_L', 'Alt_L']), keycodes=[253, 64, 205, 204], nuisance=False, nuisance keys=set(['lock', 'mod2'])
2018-09-26 11:54:22,483 change_mask(remove) ('mod2',) modifier 'mod1' using keycode 253
2018-09-26 11:54:22,483 change_mask(set(['mod1']), False, remove) failed=[]
2018-09-26 11:54:22,483 change_mask(set([]), True, add) failed=[]
2018-09-26 11:54:22,484 handle_key(1,1,numbersign,51,51,('mod2',)) keyboard_sync=True
2018-09-26 11:54:22,484 is_modifier(51) not found
2018-09-26 11:54:22,484 handle keycode pressing    51: key 'numbersign'
2018-09-26 11:54:22,484 fake_key(51, True)
2018-09-26 11:54:22,579 client keyboard processKeyEvent( false ,  [object KeyboardEvent] ) key= Digit3 keycode= 51
2018-09-26 11:54:22,580 client keyboard key-action,1,quotedbl,false,mod2,51,",51,0
2018-09-26 11:54:22,580 set_keyboard_layout_group(0) config=KeyboardConfig(gb / None / None), current keyboard group=0
2018-09-26 11:54:22,580 get_keycode(51, quotedbl, ('mod2',))=11 (level=0)
2018-09-26 11:54:22,580 process_key_action(['key-action', 1, 'quotedbl', 0, ['mod2'], 51, '"', 51, 0]) server keycode=11
2018-09-26 11:54:22,580 filtered_modifiers_set(['mod2'])=set(['mod2'])
2018-09-26 11:54:22,580 filtered_modifiers_set(('mod2',))=set(['mod2'])
2018-09-26 11:54:22,580 handle_key(1,0,quotedbl,51,11,('mod2',)) keyboard_sync=True
2018-09-26 11:54:22,580 is_modifier(11) not found
2018-09-26 11:54:22,580 handle keycode 11: key quotedbl was already unpressed, ignoring
2018-09-26 11:54:22,715 client keyboard processKeyEvent( false ,  [object KeyboardEvent] ) key= ControlLeft keycode= 17
2018-09-26 11:54:22,715 client keyboard passing clipboard modifier key event to browser: Control_L
2018-09-26 11:54:22,716 client keyboard processKeyEvent( false ,  [object KeyboardEvent] ) key= AltRight keycode= 18
2018-09-26 11:54:22,716 set_keyboard_layout_group(0) config=KeyboardConfig(gb / None / None), current keyboard group=0
2018-09-26 11:54:22,717 get_keycode(17, Control_L, ('mod2',))=37 (level=0)
2018-09-26 11:54:22,717 client keyboard key-action,1,Control_L,false,mod2,17,control,17,0
2018-09-26 11:54:22,717 process_key_action(['key-action', 1, 'Control_L', 0, ['mod2'], 17, 'control', 17, 0]) server keycode=37
2018-09-26 11:54:22,717 filtered_modifiers_set(['mod2'])=set(['mod2'])
2018-09-26 11:54:22,717 filtered_modifiers_set(('mod2',))=set(['mod2'])
2018-09-26 11:54:22,718 handle_key(1,0,Control_L,17,37,('mod2',)) keyboard_sync=True
2018-09-26 11:54:22,718 handle keycode unpressing  37: key 'Control_L'
2018-09-26 11:54:22,718 client keyboard key-action,1,Alt_R,false,mod2,18,altgraph,18,0
2018-09-26 11:54:22,718 fake_key(37, False)
2018-09-26 11:54:22,718 set_keyboard_layout_group(0) config=KeyboardConfig(gb / None / None), current keyboard group=0
2018-09-26 11:54:22,718 get_keycode(18, Alt_R, ('mod2',))=253 (level=0)
2018-09-26 11:54:22,718 process_key_action(['key-action', 1, 'Alt_R', 0, ['mod2'], 18, 'altgraph', 18, 0]) server keycode=253
2018-09-26 11:54:22,719 filtered_modifiers_set(['mod2'])=set(['mod2'])
2018-09-26 11:54:22,719 filtered_modifiers_set(('mod2',))=set(['mod2'])
2018-09-26 11:54:22,719 handle_key(1,0,Alt_R,18,253,('mod2',)) keyboard_sync=True
2018-09-26 11:54:22,719 handle keycode unpressing 253: key 'Alt_R'
2018-09-26 11:54:22,719 fake_key(253, False)

edited:

process_key_action(['key-action', 1, 'Control_L', 1, ['control', 'mod2'], 17, 'control', 17, 0]) server keycode=37
process_key_action(['key-action', 1, 'Alt_R', 1, ['mod2'], 18, 'altgraph', 18, 0]) server keycode=253
process_key_action(['key-action', 1, 'numbersign', 1, ['mod2'], 51, '#', 51, 0]) server keycode=51
process_key_action(['key-action', 1, 'quotedbl', 0, ['mod2'], 51, '"', 51, 0]) server keycode=11

Looks like the browser is sending an unpress event for a different key (quotedbl) than the press event! (numbersign)

Options worth pursuing:

  • first, ensure that AltGr triggers level=2 (and ideally we wouldn't hardcode the level value...)
  • make the get_keycode method state aware so that we can use the list of pressed keys to find the correct keycode to unpress
  • switch to no-keyboard-sync
Last edited 7 weeks ago by Antoine Martin (previous) (diff)

comment:6 Changed 7 weeks ago by Antoine Martin

Owner: changed from Antoine Martin to jeanj4ck
Status: assignednew
  • r20573 ensures we unpress the same key by keeping track of which key translation was used to press each client keycode - this fixes the wedged-key issue
  • r20575 keeps track of the AltGr key state and ensures that we set the correct key level on the server side
  • r20576: workaround for Firefox on win32 (where AltGr comes up as separate Alt + Control key events: we patch it up)
  • r20580: generic IE workarounds
  • r20581: move IE keyname workaround code so we check against the patched keyname

@jeanj4ck: all the keys should work - at least on MS Windows and Linux

comment:7 Changed 5 weeks ago by Antoine Martin

Resolution: worksforme
Status: newclosed
Note: See TracTickets for help on using tickets.