xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.


Opened 10 years ago

Last modified 9 months ago

#109 closed defect

Keyboard problems — at Version 4

Reported by: ahuillet Owned by: Antoine Martin
Priority: major Milestone: 0.3
Component: core Version: 0.1.0
Keywords: keyboard Cc:

Description (last modified by Antoine Martin)

Hello,

I'm using dvorak-fr keyboard layout, which uses a "dead" key as a modifier.
For example, to obtain $, I press 8, then release it, then press '.
8 is ISO_Level3_Latch.

When connecting to a Xpra session with this layout, it works for certain keys, but not all of them.

  • normal keys (unmodified) all work
  • normal keys with shift all work fine
  • symbols that are obtained with the dead key work, except for:

» (8 + n)
$ (8 + ')
€ (8 + g)
ù (8 + u) <<< but ìàò work fine!!
è (8 + e)
£ (8 + y)

Server:

ahuillet@demo:~/xpra/src$ setxkbmap -print
xkb_keymap {
        xkb_keycodes  { include "evdev+aliases(azerty)" };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc+fr+inet(evdev)"     };
        xkb_geometry  { include "pc(pc104)"     };
};

Local:

arthur@Chani:~$ setxkbmap -print
xkb_keymap {
        xkb_keycodes  { include "evdev+aliases(azerty)" };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc+fr(dvorak)+inet(evdev)"     };
        xkb_geometry  { include "pc(pc104)"     };
};

Xmodmap outputs are attached.

Change History (8)

Changed 10 years ago by ahuillet

Attachment: local_xmodmap_pke.txt added

xmodmap -pke on client

Changed 10 years ago by ahuillet

Attachment: local_xmodmap_pm.txt added

xmodmap -pm (local)

Changed 10 years ago by ahuillet

Attachment: server_xmodmap_pke.txt added

xmodmap -pke on server

Changed 10 years ago by ahuillet

Attachment: server_xmodmap_pm.txt added

xmodmap -pm on server

comment:1 Changed 10 years ago by ahuillet

When I use "xev" to see what happens. When I press the 8 key, I get :

when I press the 8 key, here is what I get:

KeyPress event, serial 36, synthetic NO, window 0x2800001,
    root 0x15a, subw 0x0, time 232923257, (28,84), root:(1058,901),
    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 36, synthetic NO, window 0x2800001,
    root 0x15a, subw 0x0, time 232923449, (28,84), root:(1058,901),
    state 0x90, keycode 17 (keysym 0x60, grave), same_screen YES,
    XLookupString gives 1 bytes: (60) "`"
    XFilterEvent returns: False

The output is *the same* on the client and the server, so no problem here.

Now, locally, I will do ì (works on Xpra) and $ (doesn't work on Xpra) :

KeyPress event, serial 36, synthetic NO, window 0x2800001,
    root 0x15a, subw 0x0, time 233173178, (107,77), root:(1137,894),
    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 36, synthetic NO, window 0x2800001,
    root 0x15a, subw 0x0, time 233173306, (107,77), root:(1137,894),
    state 0x90, keycode 17 (keysym 0x60, grave), same_screen YES,
    XLookupString gives 1 bytes: (60) "`"
    XFilterEvent returns: False

KeyPress event, serial 36, synthetic NO, window 0x2800001,
    root 0x15a, subw 0x0, time 233173338, (107,77), root:(1137,894),
    state 0x90, keycode 55 (keysym 0xec, igrave), same_screen YES,
    XLookupString gives 1 bytes: (ec) "ì"
    XmbLookupString gives 1 bytes: (ec) "ì"
    XFilterEvent returns: False

KeyRelease event, serial 36, synthetic NO, window 0x2800001,
    root 0x15a, subw 0x0, time 233173418, (107,77), root:(1137,894),
    state 0x10, keycode 55 (keysym 0x69, i), same_screen YES,
    XLookupString gives 1 bytes: (69) "i"
    XFilterEvent returns: False

KeyPress event, serial 36, synthetic NO, window 0x2800001,
    root 0x15a, subw 0x0, time 233173626, (107,77), root:(1137,894),
    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 36, synthetic NO, window 0x2800001,
    root 0x15a, subw 0x0, time 233173722, (107,77), root:(1137,894),
    state 0x90, keycode 17 (keysym 0x60, grave), same_screen YES,
    XLookupString gives 1 bytes: (60) "`"
    XFilterEvent returns: False

KeyPress event, serial 36, synthetic NO, window 0x2800001,
    root 0x15a, subw 0x0, time 233173818, (107,77), root:(1137,894),
    state 0x90, keycode 25 (keysym 0x24, dollar), same_screen YES,
    XLookupString gives 1 bytes: (24) "$"
    XmbLookupString gives 1 bytes: (24) "$"
    XFilterEvent returns: False

KeyRelease event, serial 36, synthetic NO, window 0x2800001,
    root 0x15a, subw 0x0, time 233173882, (107,77), root:(1137,894),
    state 0x10, keycode 25 (keysym 0x27, apostrophe), same_screen YES,
    XLookupString gives 1 bytes: (27) "'"
    XFilterEvent returns: False

And on the Xpra session :

KeyPress event, serial 30, synthetic NO, window 0x1400001,
    root 0x131, subw 0x0, time 3882373499, (87,112), root:(88,135),
    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 30, synthetic NO, window 0x1400001,
    root 0x131, subw 0x0, time 3882373606, (87,112), root:(88,135),
    state 0x90, keycode 17 (keysym 0x60, grave), same_screen YES,
    XLookupString gives 1 bytes: (60) "`"
    XFilterEvent returns: False

KeyPress event, serial 30, synthetic NO, window 0x1400001,
    root 0x131, subw 0x0, time 3882373630, (87,112), root:(88,135),
    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 30, synthetic NO, window 0x1400001,
    root 0x131, subw 0x0, time 3882373683, (87,112), root:(88,135),
    state 0x10, keycode 31 (keysym 0x69, i), same_screen YES,
    XLookupString gives 1 bytes: (69) "i"
    XFilterEvent returns: False

KeyPress event, serial 30, synthetic NO, window 0x1400001,
    root 0x131, subw 0x0, time 3882375027, (87,112), root:(88,135),
    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 30, synthetic NO, window 0x1400001,
    root 0x131, subw 0x0, time 3882375099, (87,112), root:(88,135),
    state 0x90, keycode 17 (keysym 0x60, grave), same_screen YES,
    XLookupString gives 1 bytes: (60) "`"
    XFilterEvent returns: False

KeyPress event, serial 30, synthetic NO, window 0x1400001,
    root 0x131, subw 0x0, time 3882375139, (87,112), root:(88,135),
    state 0x90, keycode 48 (keysym 0x27, apostrophe), same_screen YES,
    XLookupString gives 1 bytes: (27) "'"
    XmbLookupString gives 1 bytes: (27) "'"
    XFilterEvent returns: False

KeyRelease event, serial 30, synthetic NO, window 0x1400001,
    root 0x131, subw 0x0, time 3882375219, (87,112), root:(88,135),
    state 0x10, keycode 48 (keysym 0x27, apostrophe), same_screen YES,
    XLookupString gives 1 bytes: (27) "'"
    XFilterEvent returns: False

The only difference is the last-but-one event: it should be a keypress of "dollar", but is "apostrophe".

Is there actually anything wrong with Xpra? ...

Last edited 10 years ago by ahuillet (previous) (diff)

comment:2 Changed 10 years ago by Antoine Martin

Status: newaccepted

Does this patch help?
It should set the keyboard model on the server. (dvorak in your case)

Index: src/xpra/xkbhelper.py
===================================================================
--- src/xpra/xkbhelper.py	(revision 724)
+++ src/xpra/xkbhelper.py	(working copy)
@@ -106,13 +106,17 @@
         log.debug("do_set_keymap using xkbmap_print")
         #try to guess the layout by parsing "setxkbmap -print"
         try:
-            sym_re = re.compile("\s*xkb_symbols\s*{\s*include\s*\"([\w\+]*)")
+            sym_re = re.compile("\s*xkb_symbols\s*{\s*include\s*\"([\w\+]*)(\(\w*\))?")
             for line in xkbmap_print.splitlines():
                 m = sym_re.match(line)
                 if m:
                     layout = m.group(1)
-                    log.info("guessing keyboard layout='%s'" % layout)
-                    exec_keymap_command(["setxkbmap", layout])
+                    model = m.group(2)
+                    log.info("guessing keyboard layout='%s', model='%s'", layout, model)
+                    cmd = ["setxkbmap", layout]
+                    if model:
+                        cmd += ["-model", model]
+                    exec_keymap_command(cmd)
                     break
         except Exception, e:
             log.info("error setting keymap: %s" % e)

comment:3 Changed 10 years ago by ahuillet

The patch, in my case, doesn't work.

What I had to do is the following:

@@ -94,7 +94,7 @@
                 settings[m.group(1)] = m.group(2).strip()
         #construct the command line arguments for setxkbmap:
         args = ["setxkbmap"]
-        for setting in ["rules", "model", "layout"]:
+        for setting in ["rules", "model", "layout", "variant"]:

to get variant set to dvorak... but that doesn't solve the issue.

comment:4 Changed 10 years ago by Antoine Martin

Description: modified (diff)
Note: See TracTickets for help on using tickets.