I agree with @ilkkachu's answer that in this case, the original typesetting of the answer using "code" formatting rather than "keystrokes" makes more sense, and my edit should probably have been to revert to that typesetting. Still, we need to find a consistent style on how to represent keystrokes.
I have the impression (but cannot back it up with statistical evidence) that a widely accepted convention - which in particular novices will have often seen - is that a key combination statement written as Ctrl+C means to press the "Control" key and then the "c" key without shift, and if a "Shift" key were needed, write this as Ctrl+Shift+C, and that this is the case because on many keyboards, the keys are labelled upper-case. So, I would vote in favor of this representation when expressing key combinations as used in keyboard shortcuts, but not when it comes to entering commands on text entry prompts as in vi
or less
.
A similar problem is the representation of "key strokes" vs. "key chords", i.e. how to distinguish a key combination where the keys have to be pressed simultaneously (or the later ones at least while the former ones are still down) from a combination where one of the keys has to be released before the later keys are pressed. One could think about using Ctrl-X to mean one thing and Ctrl+X to mean the other thing, but again a consensus is needed for which means which.
Or, we could opt to remove the keystroke typesetting altogether and adopt the notation used in the Emacs documentation (although - as also noted by @Quasimodo in a comment - it is not easy to understand for people inexperienced with Emacs, which likely make up a majority of possible readers).
D
$
should really beD
shift-4
, which would be very difficult to argue as a better idea thand
$
.