Key command for "Scale--Cue"

I’d like to request the ability to assign a key command to scale selected notes. I’m often scaling notes to cue size for lead sheets and such, and it would be incredibly helpful to be able to assign this function to a key command. Thanks.

If you hack your JSON file manually, you can do this:

						"UI.InvokePropertyChangeValue?Type=kEventScale&Value=kCue" : [ "X" ]

If you would prefer grace note scale, substitute kGrace for kCue, or set kCueGrace for cue-grace scale.

Oooo… thanks Daniel!!

I assume “X” is the shortcut? For example, “Alt-c”?

Yes, take a look at the format of the other shortcuts in the file to get an idea of the format.

Daniel, I’m curious, what does the k in all those command stand for?

It’s a convention in a number of programming languages to prefix any name for a constant value with a “k”.

It seems to be one of those things where the devil’s dictionary definition of “structured programming” applies: “a method of increasing the length and complexity of the appearance of a computer program, without significantly changing its behaviour” :slight_smile:

Thanks, you two.

OT: A nice story on the delights of variable names where the first character means something.

We were once trying to integrate some software written by a German company (not Steinberg!!!) into one of our own apps. The documentation followed the usual “80-20 rule” i.e. “80% not written yet, 20% wrong” so reading the code was the only option. There was one variable name that we couldn’t figure out what it was supposed to be doing, named “korsch”. That looked like it was supposed to be German for something, but we couldn’t pin it down.

After a few weeks, somebody realized it was actually an (English) abbreviation for “CORrection SwitCH”, except that the code was written in a language were variable names starting with K were integers by default, hence the change in spelling. :smiling_imp:

Putz here, checking in.

I opened the file keycommands_en.json in a text editor and added the code to the end of it. But it’s not letting me save the file. What am I missing?

Dan, are you sure you’re editing the JSON file in the User folder, not the JSON in the program folder?

I’m attempting to edit the file in the program folder, in fact. Can you steer me aright? I can’t seem to find the user folder.

EDIT: found it. C:\Users[my username]\AppData\Roaming\Steinberg\Dorico 2

I think it’s %APPDATA%\Steinberg\Dorico 2

It didn’t work. I copied and pasted the command line above into the JSON file (at the bottom of it), substituting “Alt+C.” But when I opened Dorico, Alt-C just grabbed the Script menu from the top toolbar.

Do I need to add it to a particular spot in the JSON file? I also tried adding it under the category “kGlobal.”

I’ll have a go in an hour or so - bear with me.

Aaaaaand now none of my key commands work.

Awesome. Nice work Dan.

First things first: either restore the previous version of the document or, if you didn’t bother to save a copy somewhere safe, delete the lines you’ve added and re-save (and hope for the best!).

I did that, I think. Still nothing. Even the default ones don’t work, like Ctrl-3.

Not a single keyboard command works now, and I’m on deadline. I couldn’t leave well-enough alone…

At the risk of stating the obvious, have you restarted Dorico?