Add Waynergy configs

This is a rough one. Waynergy is the Wayland-compatible replacement for
synergy. As far as I can tell it works largely on black magic.

For whatever reason, Waynergy doesn't handle keycodes the same way
Synergy/Barrier do. It uses raw codes as sent by the server. These codes
can exceed the X cap of 318, resulting in keys being ignored in XWayland
sessions.

The dev's recommended path to keyboard support is to use a custom xkb
keymap and I guess just shrug at the dropped keys over 318. My method
uses the stock evdev xkb keymap and instead uses raw keycodes to swap
out-of-band keys to their expected keycodes.

The warning the dev gives is this is brittle and won't work on any other
OS, or possibly keyboard/box. I don't care.
This commit is contained in:
Trysdyn Black 2022-05-17 22:47:10 -07:00
parent cc5780e95e
commit f52177c077
2 changed files with 54 additions and 0 deletions

View file

@ -0,0 +1,47 @@
host = 192.168.2.1
name = arcana
xkb_key_offset = 8
[tls]
enable = false
tofu = false
[log]
level = 0
mode = a
path = /tmp/waynergy.log
[raw-keymap]
offset = 0
offset_on_explicit = false
331 = 113 #LEFT
328 = 111 #UP
333 = 114 #RIGHT
336 = 116 #DOWN
338 = 118 #INS
327 = 110 #HOME
329 = 112 #PGUP
339 = 119 #DEL
335 = 115 #END
337 = 117 #PGDN
347 = 133 #WIN
312 = 108 #RALT
349 = 135 #MENU
284 = 104 #KPEN
325 = 77 #NMLK
82 = 90 #KP0
83 = 91 #KP.
79 = 87 #KP1
80 = 88 #KP2
81 = 89 #KP3
75 = 83 #KP4
76 = 84 #KP5
77 = 85 #KP6
71 = 79 #KP7
72 = 80 #KP8
73 = 81 #KP9
309 = 106 #KP/
55 = 63 #KP*
74 = 82 #KP-
78 = 86 #KP+

View file

@ -0,0 +1,7 @@
xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete" };
xkb_symbols { include "pc+us+inet(evdev)" };
xkb_geometry { include "pc(pc105)" };
};