Is there any keyboard recorder program that works on Qubes?

I am looking for a keyboard recorder program that can work for Qubes, the ones where you can record key presses and save that macro to a certain key or hotkey so that they can be reproduced exactly the way you typed, including the delays. And a program that allows you to save many different macros to different hotkeys.
On Windows there are Pulover macro creator and perfectkeyboard, but they do not work for Qubes and I could not find any alternative for Qubes.

Do you have such applications for GNU/Linux distros like Fedora? They would probably work for Qubes OS, too, but it will require installing them in dom0 which is not safe and not recommended.

If you want only some particular action be done I would recommend writing script in bash that uses xdotool and xprop commands. Timing can be set with sleep.