How can I press "Enter" on cell in cell edit mode

Hi All. I’m trying to emulate enter/esc keys in cell edit mode with python. Qwen has offered me the next approach which I try to use in my context. But it doesn’t work, simply nothing matters…
Does anybody know how to do this?

    ctx = XSCRIPTCONTEXT.getComponentContext()
    dispatcher = ctx.getServiceManager().createInstanceWithContext("com.sun.star.frame.DispatchHelper", ctx)
    doc = XSCRIPTCONTEXT.getDocument()
    frame = doc.getCurrentController().getFrame()

    # Dispatch 'Enter' to confirm edit and exit
    dispatcher.executeDispatch(frame, ".uno:Enter", "", 0, ())

I wonder where Qwen got its inspiration. I dont see your/its uno:Enter in the following list:
https://wiki.documentfoundation.org/Development/DispatchCommands

I’ve tried “.uno:Escape” from the list too, but without any result(

… for Writer.

For Calc might be .uno:Cancel

and of course the critical question : WHY ? :thinking:

XY problem - Wikipedia