Imo, the answer to your question is obvious: Create the default event in c.doCommandByName instead of k.sumulateCommand:
1. Define k.simulateCommand as:
def simulateCommand(self, commandName: str, event: Event = None) -> None:
"""Execute a Leo command by name."""
c = self.c
c.doCommandByName(commandName, event)
2. Change the signature of c.doCommandByName to:
def doCommandByName(self, command_name: Any, event: Event = None) -> Any:
As you say, the new signature is in no way a breaking change.
3. At the start of c.doCommandByName, create an event if necessary:
if not event:
# Create a default key event.
event = g.app.gui.create_key_event(c)
4. Update Leo's docs, especially the cheat sheet to mention c.doCommandByName instead of k.simulateCommand.
Obviously, k.simulateCommand must remain for compatibility.
5. Update Leo's unit tests to use c.doCommandByName instead of k.simulateCommand.
I'll create a PR immediately.
Edward