@yoyunix Thanks for sharing this tool!
But I think I found the ultimate tool for macro: the one I tested this morning https://github.com/sezanzeb/input-remapper thanks to the comment of Moini (and added it to the article, you probably saw it). It's X11/Wayland compatible, has a GUI , presets and can also do complex macro (even mixing keyboard and mouse click, or macro with 'wait' between actions so I can do combo of shortcut keys.