How does one go about making a jump alias or shortcut for commands that aren’t listed in the shortcut dialog or jump box?
For instance, scale note size
Thanks!
How does one go about making a jump alias or shortcut for commands that aren’t listed in the shortcut dialog or jump box?
For instance, scale note size
Thanks!
You have to modify the key commands JSON file.
In “kGlobal,” add this:
UI.InvokePropertyChangeValue?Type=kEventScale&Value=kCue [ “Ctrl+Alt+C” ]
…or whatever key combination you want. You can also do a command for custom scale, I’m sure. You’d want to use the Macro recorder to see what the command language is.
…or take a look in the application log, keeping in mind that the log sometimes has some qualifiers that aren’t needed. For example, the log shows this for changing to cue size:
Executing command: UI.InvokePropertyChangeValue?Type=kEventScale&Value=string: "kCue"
Obviously, you can leave out the “Executing command” part, but you can also leave out the “string” modifer and the quotes around “kCue”.
You also want to be a little careful about which section of the key commands file you put something in. Sometimes it’s helpful to use the UI to add a key command for something similar, and then see which section Dorico puts it in.
Finally, the command needs to be added with the correct JSON syntax.
{
"UI.InvokePropertyChangeValue?Type=kEventScale&Value=kCue" : [ "Ctrl+Alt+C" ]
},
The trailing comma is required if there are items after this one.
It’s a good idea to make a backup of your file before you start editing it by hand.
This is helpful but daunting. I don’t currently have the bandwidth to educate myself on script writing.
But until just now, I haven’t even noticed the macro recorder. I just need to find a way to activate a custom macro with a shortcut.
Thanks guys!
@asherber is right, I meant the Application log.
It’s quite easy, actually, once you get it. And yes, make a backup. AND make sure Dorico is closed out.
Once you’ve added the code, you can run it through a JSON linter (basically checks for typos).
Within Dorico, you would need to do this by…editing your key commands file!
{
"Script.RunScript?ScriptPath=path/to/script.lua" : [ "Shift+F3" ]
},
You can execute saved scripts from the Script menu or from the jump bar. It looks like you ought to be able to assign jump bar aliases – entries get written in jumpBarAliases.ini – but it looks like the aliases don’t actually work.
I just added shortcuts to the Mac system app shortcuts