r-c-f/waynergy

xkb keymaps seem to be ignored

Cyb3rDudu opened this issue · 2 comments

I use waynergy on arch with waynergy-git from aur
However, when i try to use xkbkeymaps they are not utilized nor shows offset any effect.
When a xkbkeymap is set but the file is missing in eg. /usr/share/X11/xkb/keymaps/

xkb_keymap {
	xkb_keycodes  { include "macbook+aliases(qwerty)"	};
	xkb_types     { include "complete"	};
	xkb_compat    { include "complete"	};
	xkb_symbols   { include "pc+us+inet(evdev)"	};
	xkb_geometry  { include "pc(pc105)"	};
};
➜  ~ waynergy                                                                        
Dropping gid from 1002 to 1000
0.000010130: [INFO] Log initialized at level 3
0.000035189: [INFO] waynergy version v0.0.13-13-gf12dabc
wl-clipboard 2.1.0
Copyright (C) 2019 Sergey Bugaev
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
0.000750937wl-clipboard 2.1.0
Copyright (C) 2019 Sergey Bugaev
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
0.0013818690.012452480: [WARN] Child died: PID 165343, Status 1
0.012500013: [WARN] Could not kill lingering wlpaste instances: -1

0.013483193: [INFO] Output updated: 2560x1600 at 0, 0 (scale: 2)
0.013505857: [INFO] Geometry updated: 2560x1600
0.013513312: [INFO] Output name: eDP-1
0.013517319: [INFO] Output description: Built-in display
0.013524133: [INFO] Output updated: 2048x1280 at 0, 0 (scale: 2)
0.013529443: [INFO] Geometry updated: 2048x1280
0.013554412: [INFO] Compositor seems to be gnome-shell
Watch mode requires a compositor that supports wlroots data-control protocol
0.013742279: [WARN] Child died: PID 165344, Status 1
Watch mode requires a compositor that supports wlroots data-control protocol
0.013851342: [WARN] Child died: PID 165345, Status 1
0.013863405: [INFO] Using uinput
0.013866461: [INFO] Using uinput for virtual input
xkbcommon: ERROR: Couldn't find file "keycodes/macbook" in include paths
xkbcommon: ERROR: 1 include paths searched:
xkbcommon: ERROR: 	/usr/share/X11/xkb
xkbcommon: ERROR: 1 include paths could not be added:
xkbcommon: ERROR: 	/etc/xkb
xkbcommon: ERROR: Abandoning keycodes file "(unnamed)"
xkbcommon: ERROR: Failed to compile xkb_keycodes
xkbcommon: ERROR: Failed to compile keymap
0.013939394: [WARN] uinput does not support xkb keymaps -- use raw-keymap instead
[1]    165340 segmentation fault (core dumped)  waynergy

If the keyfile is provided, waynergy starts and i can move from my mac host to my arch client

➜  ~ waynergy                                                                        
Dropping gid from 1002 to 1000
0.000005129: [INFO] Log initialized at level 3
0.000028019: [INFO] waynergy version v0.0.13-13-gf12dabc
wl-clipboard 2.1.0
Copyright (C) 2019 Sergey Bugaev
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
0.000725696wl-clipboard 2.1.0
Copyright (C) 2019 Sergey Bugaev
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
0.0014645860.014191489: [WARN] Child died: PID 165407, Status 1
0.014226861: [WARN] Could not kill lingering wlpaste instances: -1

0.014880221: [INFO] Output updated: 2560x1600 at 0, 0 (scale: 2)
0.014891961: [INFO] Geometry updated: 2560x1600
0.014898613: [INFO] Output name: eDP-1
0.014902520: [INFO] Output description: Built-in display
0.014906226: [INFO] Output updated: 2048x1280 at 0, 0 (scale: 2)
0.014910123: [INFO] Geometry updated: 2048x1280
0.014939034: [INFO] Compositor seems to be gnome-shell
Watch mode requires a compositor that supports wlroots data-control protocol
Watch mode requires a compositor that supports wlroots data-control protocol
0.015154533: [WARN] Child died: PID 165408, Status 1
0.015333608: [WARN] Child died: PID 165409, Status 1
0.015354565: [INFO] Using uinput
0.015363751: [INFO] Using uinput for virtual input
0.017344224: [WARN] uinput does not support xkb keymaps -- use raw-keymap instead
0.017375689: [WARN] KDE idle inhibit selected, but no idle manager support
0.017381730: [INFO] Using GNOME idle inhibition through gnome-session-inhibit
0.017606636: [INFO] Going to connect to 192.168.111.10 at port 24800
Inhibiting until Ctrl+C is pressed...
0.211716539: [INFO] Server is Barrier 1.6
0.211816164: [INFO] Connected as client "1337"
2.0093641019.765735771

However, i realized the following warning
0.017344224: [WARN] uinput does not support xkb keymaps -- use raw-keymap instead
After i have created the raw keymap, i got most keys working, however i still do not get why xkb is not working.
Is there a dependency missing that uinput needs for xkb?

r-c-f commented

It's because uinput itself has no concept of keymap, only raw keycodes can be sent.

Thx for your reply.
Because you have mentioned that you would be willing to document a clearly defined raw-keyboard mapping for uinput feel free to use mine.
I use a Mac on barrier 2.4 with waynergy 0.13 on arch linux with gnome
On the mac i use a German Keyboard that is forwarded to the Arch client

[raw-keymap]
# character
1 = 38 #a
12 = 56 #b
9 = 54 #c
3 = 40 #d
15 = 26 #e
4 = 41 #f
6 = 42 #g
5 = 43 #h
35 = 31 #i
39 = 44 #j
41 = 45 #k
38 = 46 #l
47 = 58 #m
46 = 57 #n
32 = 32 #o
36 = 33 #p
13 = 24 #q
16 = 27 #r
2 = 39 #s
18 = 28 #t
33 = 30 #u
10 = 55 #v 
14 = 25 #w
8 = 53 #x
7 = 52 #y
17 = 29 #z
# control buttons
57 = 50 #shift
60 = 37 #strg
59 = 64 #option
56 = 133 #command
58 = 66 #caps
49 = 23 #tab
50 = 65 #space
54 = 9 #escape
52 = 22 #backspace
37 = 36 #enter
# special character
51 = 94 #<
44 = 59 #,
48 = 60 #.
45 = 61 #-
43 = 51 ##
31 = 35 #+
11 = 49 #^
34 = 34 #ü
42 = 47 #ö
40 = 48 #ä
28 = 20 #ße
25 = 21 #´
# numbers
19 = 10 #1
20 = 11 #2
21 = 12 #3
22 = 13 #4
24 = 14 #5
23 = 15 #6
27 = 16 #7
29 = 17 #8
26 = 18 #9
30 = 19 #0
# arrow keys
124 = 113 #left
125 = 114 #right
127 = 111 #up
126 = 116 #down