Record and playback of keystrokes

One of the things that I really like in Lazarus, the Delphi-like Pascal IDE, is the keyboard macro recording facility. In the code editor, one can just hit Shift-Cmd-R, record a series of keystrokes, hit Shift-Cmd-R again to stop recording, and the hit Shift-Cmd-P to play the same keystrokes. It's enormously powerful and a huge productivity booster.

Nowadays I prefer to do my coding in Zed (https://zed.dev/) but as far as I can see, they haven't yet added a keyboard macro facility. It then occurred to me that KM might be able to plug that gap. I see that there is a record button that shows up sometimes. Could this be used to achieve my wishes here?

Is that what a Quick Macro is for?

UPDATE 1
I've tried activating Quick Macro by pressing [Ctrl-F1] as per the user manual, and then clicking [Ctrl-F1] again to stop recording. When I then press [Opt-F1] to playback, precisely nothing happens :open_mouth:

UPDATE 2
I've managed t set up the keystroke of [Ctrl-Opt-Cmd R] to execute the Record Quick Macro for Hot Key ^F1 like so...

However, I cannot find the corresponding action to be triggered to carry out the playback. I've been through all the available actions, and I just cannot see a suitable candidate!

The Quick Macro can be used for all sorts of things and I use it daily rather frequntly. I have multiple of them because there are often actions that I want to do that I repeated that I wanna save into different quick macros, but I don't use them often enough or they're too specific to actually make into its own macro.

The recording inside of Keyboard maestro Editor is pretty handy and you can actually start record with command R and then run your macro and have it record all the actions that you did so you can quickly build your macro if you want something more permanent.

For me things like moving around in a spreadsheet or doing things and columns or when I'm in a digital audio workstation and I wanna move a specific track down a certain amount and then a second track down a certain amount over and over that's why I use different quick macros for those things.

Example(s) - Skillet Macros.kmmacros (207 KB)

I too find this very confusing about the Quick Macro, it's the only action that I'm aware of that actually has a keyboard shortcut built into it like this other than the keystroke (probably not explaining this very well). So if you sort by Keyboard shortcuts, you won't find the play quick macro shortcut so in your case control+F1.

https://wiki.keyboardmaestro.com/action/Record_Quick_Macro

I'm still confused! I'm pretty sure that my [Ctrl-Opt-Cmd R] macro is working because when I press it, a window pops up to say it's recording...

SCR-20250510-tqiz

The problem I have is that I cannot find a way to replay the recorded Quick Macro :open_mouth:

I've got a workable solution! By checking the Add to Macro Palette checkbox, I got a little window, confusingly labelled Record Quick Macro for Ctrl F1 but when clicked, actually replays the macro.

I'd still like to be able to initiate the playback of the macro by pressing [Ctrl-Opt-Cmd P] but this will do for now :heart_eyes:

The palette title is the same name of the macro. And I agree, it can be a little confusing. Essentially, you're recording a quick macro for the hotkey ⌃F1. So, the hotkey to record is your ⌃⌥⌘R trigger, and then you play it back using the hotkey ⌃F1.

You can change the hotkey to play your recorded quick macro inside the action.