Does it work with Wayland?

No

Which is coincidentally the same answer as every other "does X (heh) work with Wayland" question

I disagree. There are plenty of programs that run just fine on Wayland.

I acknowledge the effort that OP has put into this project. And if the OP plans to use X11 for the foreseeable future, then it makes sense to target X11. But for any new project with a wide audience Wayland is a much more reasonable target.

There is no way to "target wayland" for a tool like this. For security reasons pretty much everything this tool does is blocked on wayland. You could perhaps make a version for sway and other wlroots-using desktops that works mostly like the current tool. For GNOME you might be able to get away with rewriting it in JS as a shell extension, no idea for KDE.

yeah. this is as far as you get: https://github.com/ReimuNotMoe/ydotool.

begs the question. how come ahk can run on windows(tm) but not wayland? my understanding is that win10/11 are pretty secure.