howto gui.action_fields_and_options - deekayhd/lua-scripts GitHub Wiki
I want to use a shortcut with darktable.gui.action(), but I don't know what fields and options are available.
The darktable.gui.action() command uses the following syntax:
darktable.gui.action(
path : string,
[instance] : integer,
element : string,
[effect] : string,
[speed] : integer
)
To quickly capture the default command for a specific UI element:
- switch to the mapping mode for shortcuts
- hover over the specific UI element (button, slider, combo box, etc.).
- Once the tooltip is shown, perform long right-click to copy the default command to the clipboard.

In this example, the default command is
dt.gui.action("lib/export/set size", "selection", "item:in pixels (for file)", 1.000)
with the following parameters:
- Path : "lib/export/set size"
- Element : "selection"
- Effect : "item:in pixels (for file)"
While the steps above provide the default command, the element and effect parameters often support alternative values. To identify all available options for a specific path, proceed as follows:
- Go to the shortcuts section in the preferences module and locate the item you want to manipulate

- Assign a shortcut to it and select it

- click on the fields to see what's available

