Macro for setting number of columns in WRITER

The menu path is view/zoom/zoom/columns/

LibreOffice and “column” brings up references for Calc.

I want to easily toggle by keystroke between 1,2,3 columns in a WRITER document.

I don’t see a way of setting a key through the shortcut editor so I will have to write a macro I suppose. Where can I find a close example of this macro, or a close enough page in the API documentation.

first approximation with Recording a Macro

you eventually end up in https://wiki.documentfoundation.org/Development/DispatchCommands#Global

Dispatch command Description Group Arguments Internal name (value)
.uno:Zoom Zoom… View SID_ATTR_ZOOM (10000)
.uno:Zoom100Percent 100% View SID_ZOOM_100_PERCENT (10099)
.uno:Zoom150Percent 150% View SID_ZOOM_150_PERCENT (11423)
.uno:Zoom200Percent 200% View SID_ZOOM_200_PERCENT (11424)
.uno:Zoom50Percent 50% View SID_ZOOM_50_PERCENT (11421)
.uno:Zoom75Percent 75% View SID_ZOOM_75_PERCENT (11422)
.uno:ZoomMenu Zoom
.uno:ZoomMinus Zoom Out View SID_ZOOM_OUT (10097)

etc …

more directly → Tools - Customize - Keyboard