waynergy icon indicating copy to clipboard operation
waynergy copied to clipboard

Barrier / Waynergy Wrong Keys from Windows to Linux

Open aaronhimself opened this issue 2 years ago • 3 comments

Hey,

Im running barrier on Windows 11 as Server and Hyprland on Arch with waynergy Client is connected and the Mouse is working. But the keys transmitted are wrong. I tried to use the xkb from doc/xkb/keycodes/win and an offset of 7 in the config but that gives me a error:

Cannot compile a xkb_keycodes file alone into a keymap sementation fault core dumped waynery

I also tried setxkbmap -print to the xkb_keymap (with all offsets) the keys were just off but the mouse was working

Anyone can help out? thank you

aaronhimself avatar Jun 07 '23 09:06 aaronhimself

The keycodes file will just let you specify a different include in xkb_keycodes section in the map produced by setxkbmap -print; you'd just put win instead of evdev, for example.

If, for whatever reason, that isn't being recognized (which I think was an issue with certain compositors as of the last wlroots release) the tedious-but-assured method is to generate a raw keymap with waynergy-mapper.

r-c-f avatar Jun 07 '23 18:06 r-c-f

OK, documentation not so clear, so let's run through what I've figured out.

Running setxkbmap -print gives something like:

xkb_keymap {
    xkb_keycodes { include "evdev+aliases(querty)" };
    xkb_types  { include "complete" };
    xkb_compat { include "complete" };
    xkb_symbols { include "pc+us+inet(evdev)" };
    xkb_geometry { include "pc(pc105)" };
};

And this goes in $HOME/.config/waynergy/xkb_keymap and is then edited to change the xkb_keycodes line from evdev to win or mac (being the names of the files provided in waynergy/doc/keycodes/).

To make the win and mac files usable, though, it seems that those need to be placed in: $HOME/.config/xkb/keycodes/

And, to overcome the last obstacle that I faced, the keyboard mapping can be changed to Dvorak by using setxkbmap -layout dvorak -print as the template for the xkb_keymap file above. Replace with azerty or whatever as needed.

sh1boot avatar Oct 12 '23 01:10 sh1boot