Dorico 3 - Keyboard shortcuts for microtonal accidentals?

Well, if you’re willing to get down and dirty you should be able to do this, but it’s not super-easy.

Quit and restart Dorico (so that you will have a new application.log file created, which will make it easier to find the info you need). Start a new project that contains your favoured tonality system, and add a single player holding an instrument. Input a series of notes with your chosen accidentals, clicking on the buttons in the Accidentals panel. Quit Dorico: you can discard the project file.

Now go to your user application data folder, which on Windows is %APPDATA%\Steinberg\Dorico 3 and on Mac is /Users/your-username/Library/Application Support/Steinberg/Dorico 3. Find the file called application.log and open it in a good text editor (e.g. VS Code, BBEdit, SciTE, et al.). This logs everything that you did in the last session, including the commands that you invoked while editing your score. You’ll see some commands for each accidental you created, of the form:

2019-10-11 09:08:54.674 : Executing command: UI.InvokePaletteButton?PaletteIndicatorID=kKeySigPanel.accidental.24et.western.triple-flat.gould&PaletteSectionID=kKeySigAccidentalsPanel&PropertyButton=false&SetOldValue=false&Set=true&UseLocalOverride=0
2019-10-11 09:08:54.675 : Posting command (force): NoteInput.SetAccidental AccidentalDefinitionID=accidental.24et.western.triple-flat.gould
2019-10-11 09:08:54.685 : notifyPostCommandExecute: UI.InvokePaletteButton?PaletteIndicatorID=kKeySigPanel.accidental.24et.western.triple-flat.gould&PaletteSectionID=kKeySigAccidentalsPanel&PropertyButton=false&SetOldValue=f
2019-10-11 09:08:54.686 : Executing command: NoteInput.SetAccidental?AccidentalDefinitionID=accidental.24et.western.triple-flat.gould
2019-10-11 09:08:54.700 : notifyPostCommandExecute: NoteInput.SetAccidental?AccidentalDefinitionID=accidental.24et.western.triple-flat.gould (13 ms)
2019-10-11 09:12:36.015 : Posting command (requested): File.AutoSave Post=true

The line you need is the one that says Executing command and the crucial bit is the following, e.g. NoteInput.SetAccidental?AccidentalDefinitionID=accidental.24et.western.triple-flat.gould. We’ll call this latter half of the line a command string, and this is what you need to create a custom key command.

If you’re using the built-in 24-EDO tonality system you’ll see recognisable names for the AccidentalDefinitionID parameter but if you’re using your own custom accidentals, I’m afraid they’ll be long strings of gibberish. But they will each be unique, at least.

Pull out the command string for each of the accidental types you’re interested in. Now, in that same good text editor, open the file keycommands_en.json. This is the tricky bit: if you mess up the format of the JSON file, Dorico won’t be able to load any keyboard shortcuts at all. You can check that the format of the file is still valid by copying and pasting the whole contents into this web site and clicking the Validate JSON button.

Your goal now is to add some new entries to the kWriteMode section of this file. Look for a section that looks like this:

			{
				"context" : "kWriteMode",
				"shortcuts" : [

You now need to carefully add new entries for each of the accidentals to which you want to define new key commands, being sure to get the syntax right. Follow the example of the key commands directly above. It’s very important that you do not have a trailing comma after the last closing curly brace before the closing square bracket. The JSON linter will point out this error if you make it.

The section might end up looking a bit like this (though there will be more commands shown):

			{
				"context" : "kWriteMode",
				"shortcuts" : [
					{
						"NoteInput.SetAccidental?AccidentalDefinitionID=accidental.24et.western.triple-flat.gould" : [ "Meta+1" ]
					},
					{
						"NoteInput.SetAccidental?AccidentalDefinitionID=accidental.24et.western.triple-sharp.gould" : [ "Meta+2" ]
					}
				]
			}

Once you’ve added the desired accidentals, you can save the JSON file, validate it, and then run Dorico to see whether you got it right.