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, ())