Can't invoke macro during Record?

It seems not to be possible to invoke a Macro or keyboard shortcut during Record (or Play, either).

Is it?

Here is the scenario I am trying to enable:

Audacity is recording me while I play my instrument. At any random moment I can press a single USB foot pedal (that invokes a keyboard command) and cause Audacity to stop recording, rewind X seconds, play those X seconds, then resume recording from where I has stopped.

This is the Macro I have created:


I can make the Macro.
I can assign a keyboard shortcut to the Macro.
I can assign the keyboard shortcut to a pedal.

However, it can’t be invoked during Record because custom keyboard shortcuts (and Macros via the Apply Macro menu) are locked out during Record (or Play).

ALSO… even if I manually stop Recording via the standard Audacity interface, then invoke the Macro, the last command “Record2ndChoice:” does not get executed. Audacity does not begin recording, even though that is a command that is available for inclusion in Macros.

How to solve this?

Don’t I already know that I could get a multi-pedal device and assign Stop, Playback and Record to separate pedals?
Yes, I already know that.

My need is to make this a one-pedal action.

This works for me with Audacity 3.2.3
Append Record.txt (65 Bytes)
I’m using the “Macro Palette” to trigger the macro as keyboard shortcuts are disabled during recording. It also works by triggering the macro from the Macro Manager.

I have a similar issue: While recording, I want a shortcut to cancel (ie. stop and undo) the recording and restart it.

I’ve made a macro that works, and I can trigger it via Macro Palette/Manager with Alt+P – but only if Macro Palette/Manager has focus, which makes this impractical.

By the way, I could just stop the recording with spacebar, then undo and record again with a macro (say, ctrl+spacebar), but for some reason this macro doesn’t work.

Best option right now seems to be resorting to AutoHotkey.

Update: my “undo and record again” macro works if it has 3 commands: “undo”, “undo” again, then “record”. Maybe you could make it work by repeating the command like that or so…