Closed totaam closed 11 years ago
Please provide the output of:
setxkbmap -print
setxkbmap -query
xmodmap -pm
xmodmap -pke
And an exact diagram of the keyboard layout in question would be really helpful too for testing. (wikipedia seems to have many, is it this one?)related bugs: see also #109 (and maybe even #86)
The keyboard has the right layout, yes!
Results for native:
setxkbmap -print
xkb_keymap { xkb_keycodes { include "evdev+aliases(qwertz)" }; xkb_types { include "complete" }; xkb_compat { include "complete+ledscroll(group_lock)" }; xkb_symbols { include "pc+de(nodeadkeys)+us:2+inet(evdev)+group(rctrl_rshift_toggle)+level3(ralt_switch)+compose(menu)" }; xkb_geometry { include "pc(pc105)" }; };
setxkbmap -query
rules: evdev model: pc105 layout: de,us variant: nodeadkeys, options: lv3:ralt_switch,compose:menu,grp:rctrl_rshift_toggle,grp_led:scroll
xmodmap -pm
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), 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), Mode_switch (0xcb)- xmodmap -pke
keycode 8 # keycode 9Escape NoSymbol Escape keycode 10 = 1 exclam 1 exclam onesuperior exclamdown keycode 11 = 2 quotedbl 2 at twosuperior oneeighth keycode 12 = 3 section 3 numbersign threesuperior sterling keycode 13 = 4 dollar 4 dollar onequarter currency keycode 14 = 5 percent 5 percent onehalf threeeighths keycode 15 = 6 ampersand 6 asciicircum notsign fiveeighths keycode 16 = 7 slash 7 ampersand braceleft seveneighths keycode 17 = 8 parenleft 8 asterisk bracketleft trademark keycode 18 = 9 parenright 9 parenleft bracketright plusminus keycode 19 = 0 equal 0 parenright braceright degree keycode 20 = ssharp question minus underscore backslash questiondown U1E9E keycode 21 = acute grave equal plus cedilla cedilla keycode 22 = BackSpace NoSymbol BackSpace keycode 23 = Tab ISO_Left_Tab Tab ISO_Left_Tab keycode 24 = q Q q Q at Greek_OMEGA keycode 25 = w W w W lstroke Lstroke keycode 26 = e E e E EuroSign EuroSign keycode 27 = r R r R paragraph registered keycode 28 = t T t T tslash Tslash keycode 29 = z Z y Y leftarrow yen keycode 30 = u U u U downarrow uparrow keycode 31 = i I i I rightarrow idotless keycode 32 = o O o O oslash Oslash keycode 33 = p P p P thorn THORN keycode 34 = udiaeresis Udiaeresis bracketleft braceleft diaeresis diaeresis keycode 35 = plus asterisk bracketright braceright asciitilde macron keycode 36 = Return NoSymbol Return keycode 37 = Control_L NoSymbol Control_L keycode 38 = a A a A ae AE keycode 39 = s S s S U017F U1E9E keycode 40 = d D d D eth ETH keycode 41 = f F f F dstroke ordfeminine keycode 42 = g G g G eng ENG keycode 43 = h H h H hstroke Hstroke keycode 44 = j J j J dead_belowdot dead_abovedot keycode 45 = k K k K kra ampersand keycode 46 = l L l L lstroke Lstroke keycode 47 = odiaeresis Odiaeresis semicolon colon doubleacute doubleacute keycode 48 = adiaeresis Adiaeresis apostrophe quotedbl asciicircum asciicircum keycode 49 = asciicircum degree grave asciitilde notsign notsign keycode 50 = Shift_L NoSymbol Shift_L keycode 51 = numbersign apostrophe backslash bar grave grave keycode 52 = y Y z Z guillemotright U203A keycode 53 = x X x X guillemotleft U2039 keycode 54 = c C c C cent copyright keycode 55 = v V v V doublelowquotemark singlelowquotemark keycode 56 = b B b B leftdoublequotemark leftsinglequotemark keycode 57 = n N n N rightdoublequotemark rightsinglequotemark keycode 58 = m M m M mu masculine keycode 59 = comma semicolon comma less periodcentered multiply keycode 60 = period colon period greater U2026 division keycode 61 = minus underscore slash question dead_belowdot abovedot keycode 62 = Shift_R ISO_Next_Group Shift_R ISO_Next_Group keycode 63 = KP_Multiply XF86ClearGrab 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 XF86Switch_VT_1 F1 XF86Switch_VT_1 keycode 68 = F2 XF86Switch_VT_2 F2 XF86Switch_VT_2 keycode 69 = F3 XF86Switch_VT_3 F3 XF86Switch_VT_3 keycode 70 = F4 XF86Switch_VT_4 F4 XF86Switch_VT_4 keycode 71 = F5 XF86Switch_VT_5 F5 XF86Switch_VT_5 keycode 72 = F6 XF86Switch_VT_6 F6 XF86Switch_VT_6 keycode 73 = F7 XF86Switch_VT_7 F7 XF86Switch_VT_7 keycode 74 = F8 XF86Switch_VT_8 F8 XF86Switch_VT_8 keycode 75 = F9 XF86Switch_VT_9 F9 XF86Switch_VT_9 keycode 76 = F10 XF86Switch_VT_10 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 XF86Prev_VMode 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 XF86Next_VMode 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_Separator KP_Delete KP_Separator keycode 92 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift keycode 93 # keycode 94less greater less greater bar brokenbar bar brokenbar keycode 95 = F11 XF86Switch_VT_11 F11 XF86Switch_VT_11 keycode 96 = F12 XF86Switch_VT_12 F12 XF86Switch_VT_12 keycode 97 # keycode 98Katakana 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 104KP_Enter NoSymbol KP_Enter keycode 105 = Control_R ISO_Next_Group Control_R ISO_Next_Group keycode 106 = KP_Divide XF86Ungrab 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 121XF86AudioMute 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 133Super_L NoSymbol Super_L keycode 134 = Super_R NoSymbol Super_R keycode 135 = Multi_key Multi_key Multi_key Multi_key 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 = SunOpen NoSymbol SunOpen 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 150XF86Sleep NoSymbol XF86Sleep keycode 151 = XF86WakeUp NoSymbol XF86WakeUp keycode 152 = XF86Explorer NoSymbol XF86Explorer keycode 153 = XF86Send NoSymbol XF86Send keycode 154 # keycode 155XF86Xfer 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 # keycode 162XF86RotateWindows NoSymbol XF86RotateWindows 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 169XF86Eject 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 179XF86Tools NoSymbol XF86Tools keycode 180 = XF86HomePage NoSymbol XF86HomePage keycode 181 = XF86Reload NoSymbol XF86Reload keycode 182 = XF86Close NoSymbol XF86Close keycode 183 # keycode 184keycode 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 198keycode 199 = XF86TouchpadToggle NoSymbol XF86TouchpadToggle keycode 200 = XF86TouchpadOn NoSymbol XF86TouchpadOn keycode 201 = XF86TouchpadOff NoSymbol XF86TouchpadOff keycode 202 # keycode 203Mode_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 218Print NoSymbol Print keycode 219 # keycode 220XF86WebCam NoSymbol XF86WebCam keycode 221 # keycode 222keycode 223 = Home NoSymbol Home 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 231Cancel 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 248keycode 249 # keycode 250keycode 251 # keycode 252keycode 253 # keycode 254keycode 255 =
Just saw that in my xev listings, one difference is also that the state variable seems to have 0x6000 ORed in, always. Maybe that is confusing the modifier logic?
Is the output above from the local machine or from within xpra? (both should be almost identical)
As for the 0x6000 ORed in, that is a possibility - I just don't know what this state is! (will need to dig it up from the xev sources)
I don't know what 0x6000 is. I don't get it in my case:
KeyPress event, serial 32, synthetic NO, window 0xe00001, root 0x131, subw 0x0, time 5773757, (120,120), root:(121,143), state 0x10, keycode 17 (keysym 0xfe04, ISO_Level3_Latch), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False KeyRelease event, serial 35, synthetic NO, window 0xe00001, root 0x131, subw 0x0, time 5773822, (120,120), root:(121,143), state 0x90, keycode 17 (keysym 0x60, grave), same_screen YES, XLookupString gives 1 bytes: (60) "`" XFilterEvent returns: False KeyPress event, serial 35, synthetic NO, window 0xe00001, root 0x131, subw 0x0, time 5775118, (120,120), root:(121,143), state 0x90, keycode 93 (keysym 0x65, e), same_screen YES, XLookupString gives 1 bytes: (65) "e" XmbLookupString gives 1 bytes: (65) "e" XFilterEvent returns: False KeyRelease event, serial 35, synthetic NO, window 0xe00001, root 0x131, subw 0x0, time 5775221, (120,120), root:(121,143), state 0x10, keycode 93 (keysym 0x65, e), same_screen YES, XLookupString gives 1 bytes: (65) "e" XFilterEvent returns: False KeyPress event, serial 35, synthetic NO, window 0xe00001, root 0x131, subw 0x0, time 5777997, (120,120), root:(121,143), state 0x10, keycode 17 (keysym 0xfe04, ISO_Level3_Latch), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False KeyRelease event, serial 35, synthetic NO, window 0xe00001, root 0x131, subw 0x0, time 5778077, (120,120), root:(121,143), state 0x90, keycode 17 (keysym 0x60, grave), same_screen YES, XLookupString gives 1 bytes: (60) "`" XFilterEvent returns: False KeyPress event, serial 35, synthetic NO, window 0xe00001, root 0x131, subw 0x0, time 5778773, (120,120), root:(121,143), state 0x90, keycode 31 (keysym 0xec, igrave), same_screen YES, XLookupString gives 1 bytes: (ec) "ì" XmbLookupString gives 1 bytes: (ec) "ì" XFilterEvent returns: False KeyRelease event, serial 35, synthetic NO, window 0xe00001, root 0x131, subw 0x0, time 5778893, (120,120), root:(121,143), state 0x10, keycode 31 (keysym 0x69, i), same_screen YES, XLookupString gives 1 bytes: (69) "i" XFilterEvent returns: False
native.log
(11.4 KiB)Log of keyboard mapping related commands for native X11.
xpra_client.log
(16.2 KiB)Log of keyboard mapping related commands for running in the Xpra client.
The diff between the two looks fairly significant... there seems to be some mixup how the two active layouts
(de,us)
are mixed into the keycodes. The native version seems to go<de> <de_shift> <us> <us_shift> <de_R_alt>
... while the xpra version does<us> <us_shift> <us> <us_shift> ... ... <de> <de_shift>
. That is consistent with the question mark key (keycode 20):Native:
keycode 20 = ssharp question minus underscore backslash questiondown U1E9E
Xpra:
keycode 20 = ssharp question backslash questiondown U1E9E minus underscore
Making it obvious that the things are actually there, but apparently the fourth entry is used instead of the second, hinting at some US / DE mixup?
Can you post the output of: xpra/keys.py (this version from trunk)
svn co http://xpra.org/svn/Xpra/ cd Xpra/trunk/src/ python xpra/keys.py
Traceback (most recent call last): File "xpra/keys.py", line 58, in <module> main() File "xpra/keys.py", line 54, in main gtk_keymap = get_gtk_keymap() File "xpra/keys.py", line 27, in get_gtk_keymap from wimpiggy.gobject_compat import import_gdk ImportError: No module named gobject_compat
svn log wimpiggy/gobject_compat.py
------------------------------------------------------------------------ [r630](../commit/7150b8b8627366395f073084f10f5f6c29e3e203) | antoine | 2012-03-27 13:30:44 +0200 (Di, 27. Mär 2012) | 1 Zeile #90 introduce gobject_compat to cleanup the import mess caused by gtk3, leaves some code broken (ie: no keymap for gtk3, client completely unusable as-is with gtk3..) ------------------------------------------------------------------------
Hah, sorry about that.
You need to run this with python2, and have the whole of trunk installed. OR, just revert the gtk3 crap, by replacing:
from wimpiggy.gobject_compat import import_gdk gdk = import_gdk() try: keymap = gdk.keymap_get_default() except: keymap = None return []
with:
import pygtk pygtk.require("2.0") import gtk keymap = gtk.gdk.keymap_get_default()
And
name = gdk.keyval_name(keyval)
withgtk.gdk.keyval_name(keyval)
.Or even, easier is to just add this to the version you have from the release:
def main(): gtk_keymap = get_gtk_keymap() print("gtk_keymap: (keyval, name, keycode, group, level)\n%s" % ("\n".join([str(x) for x in gtk_keymap]))) if __name__ == "__main__": main()
native_keys.py.log
(13.9 KiB)Results of running (modified) keys.py on native X.org.
xpra_client__keys.py.log
(17.2 KiB)Results of running (modified) keys.py in Xpra.
Ah. That worked, many thanks! Attached the reuslts from both native X.org and Xpra to the entry.
Does this patch fix the issue?
Index: src/xpra/xkbhelper.py =================================================================== --- src/xpra/xkbhelper.py (revision 923) +++ src/xpra/xkbhelper.py (working copy) @@ -161,7 +161,7 @@ _, _, keycode, _, _ = entry entries = keycodes.setdefault(keycode, []) entries.append(entry) - return set_keycodes(keycodes, preserve_keycodes) + return set_keycodes(keycodes) def set_keycodes(keycodes, preserve_keycodes={}): """
Hi, this definitly helps with most keys. Thank you! The only remaining issue that I perceived was with right Alt (ISO_Level_3 shift) + "ß" (right of top row "0") which should produce a "\", but continues to produce a "ß".
The other R_Alt combinations work, for example R_Alt + 0 = }
Xev native: R_Alt + ß
KeyPress event, serial 32, synthetic NO, window 0x8c00001, root 0xc7, subw 0x0, time 2607710464, (135,71), root:(1555,471), state 0x0, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES, XKeysymToKeycode returns keycode: 92 XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False KeyPress event, serial 35, synthetic NO, window 0x8c00001, root 0xc7, subw 0x0, time 2607711608, (135,71), root:(1555,471), state 0x80, keycode 20 (keysym 0x5c, backslash), same_screen YES, XLookupString gives 1 bytes: (5c) "\" XmbLookupString gives 1 bytes: (5c) "\" XFilterEvent returns: False KeyRelease event, serial 35, synthetic NO, window 0x8c00001, root 0xc7, subw 0x0, time 2607711744, (135,71), root:(1555,471), state 0x80, keycode 20 (keysym 0x5c, backslash), same_screen YES, XLookupString gives 1 bytes: (5c) "\" XFilterEvent returns: False KeyRelease event, serial 35, synthetic NO, window 0x8c00001, root 0xc7, subw 0x0, time 2607712136, (135,71), root:(1555,471), state 0x80, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES, XKeysymToKeycode returns keycode: 92 XLookupString gives 0 bytes: XFilterEvent returns: False
Xev native R_Alt + 0:
KeyPress event, serial 35, synthetic NO, window 0x8c00001, root 0xc7, subw 0x0, time 2607724710, (134,63), root:(1554,463), state 0x0, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES, XKeysymToKeycode returns keycode: 92 XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False KeyPress event, serial 35, synthetic NO, window 0x8c00001, root 0xc7, subw 0x0, time 2607724942, (134,63), root:(1554,463), state 0x80, keycode 19 (keysym 0x7d, braceright), same_screen YES, XLookupString gives 1 bytes: (7d) "}" XmbLookupString gives 1 bytes: (7d) "}" XFilterEvent returns: False KeyRelease event, serial 35, synthetic NO, window 0x8c00001, root 0xc7, subw 0x0, time 2607725046, (134,63), root:(1554,463), state 0x80, keycode 19 (keysym 0x7d, braceright), same_screen YES, XLookupString gives 1 bytes: (7d) "}" XFilterEvent returns: False KeyRelease event, serial 35, synthetic NO, window 0x8c00001, root 0xc7, subw 0x0, time 2607725102, (134,63), root:(1554,463), state 0x80, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES, XKeysymToKeycode returns keycode: 92 XLookupString gives 0 bytes: XFilterEvent returns: False
Xev in Xpra R_Alt + ß:
KeyPress event, serial 30, synthetic NO, window 0x800001, root 0xfd, subw 0x0, time 2607744310, (144,60), root:(146,83), state 0x0, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES, XKeysymToKeycode returns keycode: 92 XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False KeyPress event, serial 30, synthetic NO, window 0x800001, root 0xfd, subw 0x0, time 2607744597, (144,60), root:(146,83), state 0x80, keycode 20 (keysym 0x1001e9e, U1E9E), same_screen YES, XLookupString gives 3 bytes: (e1 ba 9e) "ẞ" XmbLookupString gives 3 bytes: (e1 ba 9e) "ẞ" XFilterEvent returns: False KeyRelease event, serial 30, synthetic NO, window 0x800001, root 0xfd, subw 0x0, time 2607744709, (144,60), root:(146,83), state 0x80, keycode 20 (keysym 0x1001e9e, U1E9E), same_screen YES, XLookupString gives 3 bytes: (e1 ba 9e) "ẞ" XFilterEvent returns: False KeyRelease event, serial 30, synthetic NO, window 0x800001, root 0xfd, subw 0x0, time 2607744925, (144,60), root:(146,83), state 0x80, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES, XKeysymToKeycode returns keycode: 92 XLookupString gives 0 bytes: XFilterEvent returns: False
Xev in xpra: R_Alt + 0:
KeyPress event, serial 27, synthetic NO, window 0x800001, root 0xfd, subw 0x0, time 2607740502, (144,60), root:(146,83), state 0x0, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES, XKeysymToKeycode returns keycode: 92 XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False KeyPress event, serial 30, synthetic NO, window 0x800001, root 0xfd, subw 0x0, time 2607741437, (144,60), root:(146,83), state 0x80, keycode 19 (keysym 0x7d, braceright), same_screen YES, XLookupString gives 1 bytes: (7d) "}" XmbLookupString gives 1 bytes: (7d) "}" XFilterEvent returns: False KeyRelease event, serial 30, synthetic NO, window 0x800001, root 0xfd, subw 0x0, time 2607741598, (144,60), root:(146,83), state 0x80, keycode 19 (keysym 0x7d, braceright), same_screen YES, XLookupString gives 1 bytes: (7d) "}" XFilterEvent returns: False KeyRelease event, serial 30, synthetic NO, window 0x800001, root 0xfd, subw 0x0, time 2607741950, (144,60), root:(146,83), state 0x80, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES, XKeysymToKeycode returns keycode: 92 XLookupString gives 0 bytes: XFilterEvent returns: False
I believe the remaining issues can be solved by #149
applied in r942: removed preserve_keycodes
The remaining issues will be followed up in #149
In trying to reproduce your problem I found this interesting error message:
Warning: Type "ONE_LEVEL" has 1 levels, but <RALT> has 2 symbols Ignoring extra symbols
Which led me to some bug reports:
More info found on the
xkb_symbols
like this one:xkb_symbols { include "pc(pc105)+fi+inet(logicdp)" };
"All the xkb_(whatevers) in the setxkbmap output are directories inside /usr/share/X11/xkb, and the (optionally plus-delimited) include parameters are files inside those directories. The stuff inside parentheses are sections inside those files. lessing about said files is a good way to see what sort of stuff gets fed to xkbcomp."
Also doc on Defining New Layouts and XKB-Config, and extending-xkb
One very useful command for visualizing the keyboard map:
xkbprint -label name $DISPLAY - | gv -orientation=seascape -
The problem is that when I setup my keyboard like yours... I don't have the problem (yet).
As for the Xev data, correct me if I am wrong, but the only noticable difference that I can see for the "ß" key are:
keysym 0x5c, backslash
(x11) vskeysym 0x1001e9e, U1E9E
(xpra) There are no differences for theISO_Level3_Shift
keypress/keyrelease.Can you apply this small patch and tell me what the server prints when you hit this key combination on the client:
Index: src/xpra/server.py =================================================================== --- src/xpra/server.py (revision 957) +++ src/xpra/server.py (working copy) @@ -1510,6 +1510,7 @@ log.info("ignoring key action packet since keyboard is turned off") return (wid, keyname, pressed, modifiers, keyval, _, client_keycode) = packet[1:8] + log.info("process_key_action: %s" % packet[1:]) keycode = self.keycode_translation.get(client_keycode, client_keycode) #currently unused: (group, is_modifier) = packet[8:10] self._focus(wid, None) @@ -1524,7 +1525,7 @@ Does the actual press/unpress for keys Either from a packet (_process_key_action) or timeout (_key_repeat_timeout) """ - log("handle_key(%s,%s,%s,%s,%s,%s)", wid, pressed, name, keyval, keycode, modifiers) + log.info("handle_key(%s,%s,%s,%s,%s,%s)", wid, pressed, name, keyval, keycode, modifiers) if pressed and (wid is not None) and (wid not in self._id_to_window): log("window %s is gone, ignoring key press", wid) return
This is what I get:
process_key_action: [1, 'ISO_Level3_Shift', 1, [], 65027, '', 113, 0, 0] handle_key(1,1,ISO_Level3_Shift,65027,113,[]) process_key_action: [1, 'backslash', 1, ['mod5'], 92, '\\', 20, 0, 0] handle_key(1,1,backslash,92,20,['mod5']) process_key_action: [1, 'backslash', 0, ['mod5'], 92, '\\', 20, 0, 0] handle_key(1,0,backslash,92,20,['mod5']) process_key_action: [1, 'ISO_Level3_Shift', 0, ['mod5'], 65027, '', 113, 0, 0] handle_key(1,0,ISO_Level3_Shift,65027,113,['mod5'])
I have just committed a large amount of code to try to properly fix support for "ISO_Level3_shift" (see r1779 and the previous few days in timeline), including fixes for win32 clients.
It seems to work here (though I never use "
AltGr
" myself so I cannot be certain all keys do map correctly), however, in the process I have found that the core X11 APIs are not symmetrical, which means that the layouts we set are not the layouts we get back.. meaning that it is impossible to ensure that the layouts match exactly without using the Xkb API (which is a sizable amount of work).Hopefully, this change will be enough to fix your remaining issue - if not, it will have to wait a little while longer.. sorry. You can find beta packages with those changes in the beta area
Not heard back - closing.
Sorry for keeping quiet on this for so long. Many thanks for digging through this. Will try current SVn and report back on how things work out.
No problem - just tidying up after a release.
Feel free to try svn or the just released 0.7.0, there's not much difference between them yet.
Just tested this with 0.7.0, and I must say it works great! ... except ... for one additional character combination, which is
AltGr
+ Q => @.Xev from inside xpra:
KeyPress event, serial 27, synthetic NO, window 0x800001, root 0x12d, subw 0x0, time 760421596, (61,122), root:(1095,713), state 0x4010, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES, XKeysymToKeycode returns keycode: 92 XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False KeyPress event, serial 30, synthetic NO, window 0x800001, root 0x12d, subw 0x0, time 760422625, (61,122), root:(1095,713), state 0x4090, keycode 24 (keysym 0x0, NoSymbol), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False KeyRelease event, serial 30, synthetic NO, window 0x800001, root 0x12d, subw 0x0, time 760422724, (61,122), root:(1095,713), state 0x4090, keycode 24 (keysym 0x0, NoSymbol), same_screen YES, XLookupString gives 0 bytes: XFilterEvent returns: False KeyRelease event, serial 30, synthetic NO, window 0x800001, root 0x12d, subw 0x0, time 760423440, (61,122), root:(1095,713), state 0x4090, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES, XKeysymToKeycode returns keycode: 92 XLookupString gives 0 bytes: XFilterEvent returns: False
And xev with native x-server:
KeyPress event, serial 34, synthetic NO, window 0x9200001, root 0x162, subw 0x9200002, time 760584525, (67,40), root:(848,763), state 0x10, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES, XKeysymToKeycode returns keycode: 92 XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False KeyPress event, serial 34, synthetic NO, window 0x9200001, root 0x162, subw 0x9200002, time 760585348, (67,40), root:(848,763), state 0x90, keycode 24 (keysym 0x40, at), same_screen YES, XLookupString gives 1 bytes: (40) "@" XmbLookupString gives 1 bytes: (40) "@" XFilterEvent returns: False KeyRelease event, serial 34, synthetic NO, window 0x9200001, root 0x162, subw 0x9200002, time 760585449, (67,40), root:(848,763), state 0x90, keycode 24 (keysym 0x40, at), same_screen YES, XLookupString gives 1 bytes: (40) "@" XFilterEvent returns: False KeyRelease event, serial 34, synthetic NO, window 0x9200001, root 0x162, subw 0x9200002, time 760586429, (67,40), root:(848,763), state 0x90, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES, XKeysymToKeycode returns keycode: 92 XLookupString gives 0 bytes: XFilterEvent returns: False
I also get
The XKEYBOARD keymap compiler (xkbcomp) reports: > Warning: Type "ONE_LEVEL" has 1 levels, but <RALT> has 2 symbols > Ignoring extra symbols
Debug output for the
AtlGr
+Q
in Xpra test:2012-10-10 13:20:16,753 process_key_action(['key-action', 2, 'ISO_Level3_Shift', True, ('mod2',), 65027, '', 108, 0, 0]) server keycode=108 2012-10-10 13:20:16,753 handle_key(2,True,ISO_Level3_Shift,65027,108,('mod2',)) 2012-10-10 13:20:16,753 handle keycode pressing 108: key ISO_Level3_Shift 2012-10-10 13:20:16,754 scheduling key repeat timer with delay 660 for ISO_Level3_Shift / 108 2012-10-10 13:20:17,029 will process ui packet key-action 2012-10-10 13:20:17,029 process_key_action(['key-action', 2, 'at', True, ('mod2', 'mod5'), 64, '@', 24, 0, 0]) server keycode=24 2012-10-10 13:20:17,030 handle_key(2,True,at,64,24,('mod2', 'mod5')) 2012-10-10 13:20:17,030 handle keycode pressing 24: key at 2012-10-10 13:20:17,031 scheduling key repeat timer with delay 660 for at / 24 2012-10-10 13:20:17,103 will process ui packet key-action 2012-10-10 13:20:17,103 process_key_action(['key-action', 2, 'ISO_Level3_Shift', False, ('mod2', 'mod5'), 65027, '', 108, 0, 0]) server keycode=108 2012-10-10 13:20:17,104 handle_key(2,False,ISO_Level3_Shift,65027,108,('mod2', 'mod5')) 2012-10-10 13:20:17,105 handle keycode unpressing 108: key ISO_Level3_Shift 2012-10-10 13:20:17,105 cancelling key repeat timer: 1304 for ISO_Level3_Shift / 108 2012-10-10 13:20:17,111 will process ui packet key-action 2012-10-10 13:20:17,111 process_key_action(['key-action', 2, 'q', False, ('mod2',), 113, 'q', 24, 0, 0]) server keycode=24 2012-10-10 13:20:17,112 handle_key(2,False,q,113,24,('mod2',)) 2012-10-10 13:20:17,112 handle keycode unpressing 24: key q 2012-10-10 13:20:17,113 cancelling key repeat timer: 1310 for q / 24
So it looks like the "@" / "at" is properly detected.
Issue migrated from trac ticket # 108
component: client | priority: critical | resolution: worksforme
2012-04-13 14:15:24: stephan created the issue