Hello all :), it's me again, still in the process of switching from Emacs to Kate and improving it with things I actually miss.
Here is a first version of a working implementation of a keyboard macros plugin.
I don't consider it ready for merging into master yet but it probably could benefit some testing if anyone has some time to spend on it, so I'm making this MR now :).
As of now, the plugin adds a "Keyboard Macros" submenu at the end of the "Tools" menu. In it are actions to start/stop recording a macro, cancel a recording (and keep the previous macro as the current one), and play the current macro.
The default shortcuts that I suggest are Ctrl+Shift+K to start/stop recording and Ctrl+Alt+K to play the current macro. I don't think it conflicts with any other default bindings and it feels nice and coherent with Kate.
In the future I plan on making macros savable by giving them a name and serializing them in the config, and make saved macros callable from a command.