gnome-macos-remap icon indicating copy to clipboard operation
gnome-macos-remap copied to clipboard

Feature request: Wayland compatability

Open aioue opened this issue 3 years ago • 8 comments

Now that 21.04 uses Wayland by default.

aioue avatar Apr 28 '21 21:04 aioue

Unfortunately this remap script utilizes Autokey, which is an X11 application. It does not seem possible to run Autokey on wayland yet.

Alternative solution would be to replace Autokey with another remapper that works under Wayland. There are a few: KeyMapper, Hawk, Waybind. Wayland is more strict display server and none of the above programs seem to allow assigning application-specific keys. I recently tried KeyMapper (the one with the most Git stars) and did not manage to get it work stable enough.

I have Wayland on my radar and update this thread accordingly. Current version of the script will run on Ubuntu 21.04 if you switch the display server to 'Xorg'.

petrstepanov avatar May 01 '21 01:05 petrstepanov

Unless additional features are added to wayland I believe we, as developers, may be better off learning to communicate to the DE in question. That is more work for us devs though, since we'd then need to support separate DE's instead of a single backend like x11 or wayland. I did do some tests already on doing that with Gnome DE under wayland specifically and the xkeysnail project, but the performance and reliability was not good.

I posted my findings over at xkeysnail - but unless someone chimes in and/or finds a better way I am stuck as well with my kinto project.

rbreaves avatar Nov 16 '21 22:11 rbreaves

I agree. Recently I've tried implementing this remap in Wayland with https://github.com/sezanzeb/key-mapper. However, it was not running stable enough.

petrstepanov avatar Nov 16 '21 22:11 petrstepanov

For those who are interested, a very early Wayland compatible version with limited number of keybindings is published here https://github.com/petrstepanov/gnome-macos-remap-wayland. I am sure we will have a solid Wayland solution early 2021.

petrstepanov avatar Dec 13 '21 16:12 petrstepanov

JFYI There is xremap appears, and author claims that it is faster

Xremap is written in Rust, which is faster than JIT-less interpreters like Python.

olosegres avatar Jan 30 '22 14:01 olosegres

JFYI There is xremap appears, and author claims that it is faster

Xremap is written in Rust, which is faster than JIT-less interpreters like Python.

Oooh, this looks nice, multi-wm (xorg+wayland) and simple config via toml/yaml!!!!

any mac keyconfigs for Xremap? :)

ameeno avatar May 09 '22 10:05 ameeno

@olosegres thank you for pointing out the xremap. It seems to be a promising solution. I tried it a few times and was not able to get it working on Fedora 36 with Gnome 42.1. It might take some time to get things working stable.

@ameeno meanwhile you can replace your display manager with an antique one. If you want to help things move quicker feel free to to test this xremap issue on your Fedora.

petrstepanov avatar May 22 '22 03:05 petrstepanov

Update for the Wayland solution with xremap. I attempted to implement the remap with with xremap program but ran into an issue with modifier key combinations. I'll publish a Wayland solution after the issue is resolved.

petrstepanov avatar Jun 14 '22 07:06 petrstepanov

Just published version for wayland here: https://github.com/petrstepanov/gnome-macos-remap-wayland

petrstepanov avatar Oct 01 '23 23:10 petrstepanov