For example I generate custom inputs for a bunch of shortcuts and append them to the name of the shortcut:
Code: Select all
local shortcuts = {
"draw-grid"
}
for _, name in pairs(shortcuts) do
if data.raw.shortcut[name] then
data:extend({{
type = "custom-input",
name = data.raw.shortcut[name].name,
localised_name = data.raw.shortcut[name].localised_name,
order = data.raw.shortcut[name].order,
key_sequence = ""
}})
data.raw.shortcut[name].localised_name = {"", data.raw.shortcut[name].localised_name, " ", {"Shortcuts-ick.control", name}}
end
end
Code: Select all
[Shortcuts-ick]
control=(__CONTROL____1____)