I wrote an extension for LibreOffice. I would like to trigger some functions via a keyboard shortcut. However, I was unable to find out how this can be done. I saw that some extension have macros that – by standard – can be assigned to shortcuts, but I did not find out 1) yet how I could trigger functions of my extension via a macro 2) How I can integrate the macros in my extension. (see below – implementation uses uno service, not macros)
Mentioned extension: https://extensions.libreoffice.org/extensions/qda-tagtree
The “update” function should be trigger-able with a keyboard shortcut.
UPDATE:
Turned out that this is a bit more complicated. So the "Accelerators.xcu" part worked (it shows up in the Keyboard-shortcut customization dialog).
However, using the shortcut does not work. I found out that executing a method on the triggering of a shortcut need a UNOService to call.
I created the service and implemented an XJobExecutor Interface. Pressing the assigned Shortcut, Ctrl+Shift+L does not result in execution of the trigger method.
I wonder what goes wrong, but even if I debug the code step by step I can’t find out where it goes wrong. I was sadly unable to find a documentation of the .addImplementation method of g_ImplementationHelper which might help me.