Key Commands & keycommands.json Questions ...

So I’ve been editing my keycommands.json file to create some shortcuts using the great tutorial Leo posted here and have some further questions:

It seems like there are some key commands buried in the default keycommands.json file found in the Program Files folder that don’t show up in Preferences/Key Commands. For example “EventEdit.Nudge?Direction=Left&Amount=kALot&AlternateNudgeMode=true”: [ “Ctrl+Alt+H” ] is in that keycommands.json file but if I search Key Commands for “nudge” nothing comes up. If I click Print Summary to open up the interactive list of my Key Commands, then Ctrl+Alt+H is listed as “Upgrade ( Left, Amount: A Lot, Alternate Nudge Mode: true )” but Upgrade shows up as an Application shortcut in Key Commands which obviously has nothing to do with nudging.

I know we should be hacking the keycommands.json file found in the /AppData/Roaming/Steinberg/Dorico 3 folder, but is there any harm in modifying the one in Program Files too? Especially to remove a command that doesn’t seem to be able to be accessed in Preferences/Key Commands? I have Ctrl+Alt+H set to hide a chord symbol in my user keycommands file under kGlobal and it works in Write but the kEngraveMode shortcut from the Program Files folder seems to override it in Engrave Mode, which clearly is not what I want.

Other kGlobal shortcuts I’ve set up work in either Write or Engrave. For example I have Ctrl-H set up to hide anything in either by setting the alpha channel to 0. (This also works for chord symbols too of course, but the spacing still thinks it’s there so I need to actually use Hidden for chords.) The question of kGlobal vs kWrite and kEngraveMode also got me thinking about other options too. For the most part I really like Dorico’s modular conception, but I’d love to use Shift+S in Write to create a system break as I’d use that way more often than as Stop Slur. Is there any harm in removing it from Stop Slur and making it a kGlobal command?

Sorry this is a bit of a stream of consciousness post, I’m just curious how others use the vs Program Files json file, and also modular vs kGlobal hacks. Thanks for any advice!

The Program Files .json file is “part of the installation”, and so will be overwritten by updates and new installs. The .json is your customization of the default.
It’s good practice not to modify both of them: firstly, it’s confusing as to what has been done where; secondly, you can reset to Steinberg’s default just by deleting the user file, without needing to test whether problems are in your mods to the Program file.

I figured as much, but I can’t figure out how to remove Ctrl+Alt+H through the Key Commands interface. I’d love to be able to simply remove it so my kGlobal Ctrl+Alt+H will actually work globally. I don’t think there’s a way to do this without modifying the Program Files json.

Are you sure the json file doesn’t take priority?

Remove any other factory key command through the Preferences dialog, then look at what effect that has on the user JSON. It’s something along the lines of “function = “shortcut” DELETE”

Then swap out the shortcut and function for Ctrl+Alt+H and Nudge.

Yeah, I was surprised when my Ctrl+Alt+H was a nudge in Engrave instead of Hide as my other kGlobal commands worked in both Write and Engrave. That’s what got me investigating why this was happening.

Ah, ok. I’ll try that later this afternoon, thanks!

It worked, thanks! So I guess there’s never a need to edit the keycommands.json that resides in Program Files as any command in there can be overridden in the user file. For some existing commands a DELETE line has to be added if it’s a command that can’t be removed via Preferences.

Precisely.

A couple more questions …

  1. There’s no way to have a single keystroke trigger a series of commands by editing the keycommands.json is there? A macro program, StreamDeck or something is still needed, right?

  2. I was trying to make Shift-S to create a system break work in Write too, but can’t seem to do it. I added “NoteInput.SlurStop”: [ “DELETE:Shift+S” ] in kStepTimeInput and then tried adding “Edit.CreateSystemBreak”: [ “Shift+S” ] in kWriteMode but that didn’t work. Adding it to kGlobal didn’t work either. Maybe I should give up on this, and know I can Alt-click breaks in Write, but I would like to figure out if this is possible. Has anyone else tried making a modular-based shortcut and gotten it to work in other modes too?

Thanks!

  1. No, not possible directly from the keycommands json.
  2. See Request: Shift-S System Break in Write Mode - Dorico - Steinberg Forums

Daniel describes one method for making Breaks with key commands in Write mode here:

I do have Metagrid, but for sequential commands, I’m using the script menu. I have a script to split chords into voices, Hide Stems, alternate barline styles, and other things.

Thanks! Forgot about that thread and I even posted in it, LOL. I still can’t seem to get it to work though, even in the kMusicEditable context where Daniel said to put the command. I don’t think I have a conflict since I have the line “NoteInput.SlurStop”: [ “DELETE:Shift+S” ] in kStepTimeInput, which is where it resides in the Program Files json. I’ll keep playing around and see if I can figure it out.