https://bugs.documentfoundation.org/show_bug.cgi?id=148613

            Bug ID: 148613
           Summary: Setting hotkey via macro only works after a restart.
           Product: LibreOffice
           Version: 7.3.2.2 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: [email protected]
          Reporter: [email protected]

Execute a macro that sets the Alt+F1 hotkey. Alt+F1 combination starts to be
processed only after LO restart.

Sub TestAccSetKey
   Dim oACC, keyEvent As New com.sun.star.awt.KeyEvent 
  
oACC=com.sun.star.ui.ModuleAcceleratorConfiguration.createWithModuleIdentifier("com.sun.star.sheet.SpreadsheetDocument")
 
   With keyEvent
     .KeyCode=com.sun.star.awt.Key.F1
     .Modifiers=4   ' Alt
   End With   
   oAcc.setKeyEvent KeyEvent,
"vnd.sun.star.script:Standard.Module1.MyMacro?language=Basic&location=application"
   oAcc.store  ' save
End Sub

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to