[winswitch] Windows to Linux shadow: Wrong keyboard mapping

Frank Loemker FrankL at envipco.com
Tue Mar 12 15:39:23 GMT 2019


Hello,

I am currently trying to get shadow access from Windows 10 to Ubuntu Linux
14.04 working. The server on the Linux box is using 1.0.13-r21370 64-bit.
The client on Windows is 1.0.13-r21474 32-bit. I tried as well 2.4.3-r21365
and 0.17.4-r12925 under Windows with exactly the same result.

All the time keyboard mapping is completely off. E.g.
    space  ->  'o'
    'p' -> '-'
    'y' -> ~
    Insert -> 'k'
    Home -> Return
    ...
>From Linux to Linux it works fine, all keys are correct. It works as well fine when
using "start" to start a single program instead of using "shadow". For "start" all
keys are working when connecting from Windows to Linux.

What I saw till now, from Windows to Linux:
    Client log: parse_key_event(<gtk.gdk.Event at 049D9560: GDK_KEY_PRESS keyval=space>, True)=<GTKKeyEvent object, contents: {'modifiers': [], 'group': 0, 'string': ' ', 'keyname': 'space', 'pressed': True, 'keyval': 32, 'keycode': 32}>
    Server log:  client parse_key_event(<gtk.gdk.Event at 049D9560: GDK_KEY_PRESS keyval=space>, True)=<GTKKeyEvent object, contents: {'modifiers': [], 'group': 0, 'string': ' ', 'keyname': 'space', 'pressed': True, 'keyval': 32, 'keycode': 32}>

>From Linux to Linux:
    Client log: client parse_key_event(<gtk.gdk.Event at 0x7f9200bf25a8: GDK_KEY_PRESS keyval=space>, True)=<GTKKeyEvent object, contents: {'modifiers': [], 'group': 0, 'string': ' ', 'keyname': 'space', 'pressed': True, 'keyval': 32, 'keycode': 65}>
    Server log: client parse_key_event(<gtk.gdk.Event at 0x7f9200bf25a8: GDK_KEY_PRESS keyval=space>, True)=<GTKKeyEvent object, contents: {'modifiers': [], 'group': 0, 'string': ' ', 'keyname': 'space', 'pressed': True, 'keyval': 32, 'keycode': 65}>

I.e. if I interpret that correctly: The keycode in the Windows case is wrong. For
space a keycode of 32 is generated, which is exactly the 'o'. For the Linux case
the correct keycode 65 is generated. The windows case seems to send
keyval==keycode.

I see that as well in the debug output of get_entries_for_keycode():
    Windows:
        get_entries_for_keycode(32)=((32, 32, 0, 0), (32, 32, 0, 1), (16777215, 32, 1, 0), (16777215, 32, 1, 1))
        get_entries_for_keycode(65)=((97, 65, 0, 0), (65, 65, 0, 1), (16777215, 65, 1, 0), (16777215, 65, 1, 1))
    Linux:
        get_entries_for_keycode(32)=((111, 32, 0, 0), (79, 32, 0, 1))
        get_entries_for_keycode(65)=((32, 65, 0, 0),)

Keyboard:
    Windows: <xpra.platform.win32.keyboard.Keyboard object at 0x04F654B0>.get_layout_spec()=('us', ['us', 'us'], None, [])

Am I doing something wrong? Or should I report a bug with complete logs attached?

Thanks,

--
Frank Lömker


More information about the shifter-users mailing list