https://bugs.documentfoundation.org/show_bug.cgi?id=94522
Neil Roberts <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #6 from Neil Roberts <[email protected]> --- For what it’s worth, it looks like all the plumbing necessary to implement this is already in the source code, it’s just missing a UI to set the keyboard shortcuts. You can however set a document shortcut to a macro with LibreOffice BASIC. For example, if you have a macro called “Main” defined in your document, you can run this bit of BASIC to assign the macro to F7. This assignment will be stored in the .odt file and then when you open the document with a different instance of LibreOffice, you can just press F7 to run the macro (assuming you have macros enabled in the security options). You can delete the code once it has been run once to assign the shortcut. Sub SetShortcutKey uiconf = ThisComponent.getUIConfigurationManager() shortCutManager = uiconf.getShortCutManager() Dim key as new com.sun.star.awt.KeyEvent key.KeyCode = com.sun.star.awt.Key.F7 shortCutManager.setKeyEvent(key, "vnd.sun.star.script:Standard.Module1.Main?language=Basic&location=document") shortCutManager.store() End Sub (ps, saluton samideano :) ) -- You are receiving this mail because: You are the assignee for the bug.
