Is there a way to write a shortcut to a specific function within Renoise?

I’m looking for a way of modifying Keyboard shortcuts (the xml) so that i could set, say, the F6 key to be Global:Transport:Play Pattern. . Any suggestions or ideas?

as stated - this isn’t about "yeah just do it by hand on Renoise → Settings → Shortcuts.
This is about running a script that destructively overwrites / modifies the keybindings.xml to have the required keyboard configurations.
for specific features.

Will modify play song or pattern or lot’s of mappings.

i meant with lua scripting. programmatically. specifically modifying keybindings.xml lines to conform to a specific setting. not doing these by hand using Renoise → Settings → Shortcuts

Yes. It seems this boils down to editing a text file via Lua. Using Lua:

  1. Find the text file of the commands.
  2. Open it.
  3. Find the line you want to edit (you will have to know which one it is). The text should have a structure.
  4. Replace it with the command you want
  5. Save and close the file.
  6. In theory you should restart Renoise (you won’t like this). Upon reboot, Renoise will reload the file with the commands.
1 Like

It appears that Renoise accepts command xml file uploads.
Make a copy of the original first. Edit the copy with the steps above and then upload it, all using Lua. This should be lightning fast to execute. It’s just text editing.

Edit: You should look to see if the API allows loading command xml files. Something similar to: renoise.app():load_theme(filename)

The next code not exist! →

renoise.app():load_keybindings("path/to/keybindings.xml")

I find it a little strange that the API doesn’t allow loading key command xml files. Everything is designed to add commands with add_keybindings for your own tool.

1 Like