Multiple functions from a keyboard shortcut?

Hi,

I need to insert empty rows between a few thousand sets of data as part of a process towards generating a CSV. I’ve figured out how to create a keyboard shortcut, but is it possible for one shortcut to do multiple things in order? For example, instead of setting F3 to “insert row above” and then pressing up, could I tell F3 to do both functions in order? If so, instead of alternating keys, I could just hold down F3 until the process is complete.

Hello,

Afaik you’d need a macro for such combined action (which in turn could be assigned to a shortcut). Your example insert row above + up could be achieved by:

sub InsertRowUp

 dim oDoc as object
 dim oDisp as object

 oDoc   = ThisComponent.CurrentController.Frame
 oDisp  = createUnoService("com.sun.star.frame.DispatchHelper") 
 oDisp.executeDispatch(oDoc, ".uno:InsertRowsBefore", "", 0, Array())
 oDisp.executeDispatch(oDoc, ".uno:GoUp", "", 0, Array())

end sub

(At least that works for me on LibreOffice 7.0.4.2).