Post History
I am assuming that your organization does not have an official style guide, or that this is a personal project. (If you are bound by a style guide, consult it.) I am also assuming that you aren't...
Answer
#3: Attribution notice added
Source: https://writers.stackexchange.com/a/19456 License name: CC BY-SA 3.0 License URL: https://creativecommons.org/licenses/by-sa/3.0/
#2: Initial revision
I am assuming that your organization does not have an official style guide, or that this is a personal project. (If you are bound by a style guide, consult it.) I am also assuming that you aren't using a semantic markup already; if you're using a DTD/schema/tool/markdown that already has a notion of "keyboard input", you'd use that unless there's a good reason not to. The Microsoft Style Guide is a common choice for software companies in my experience. This guide (4th edition, p 91) calls for capitalizing key names but not otherwise formatting them. It gives a list of "official" names of special keys. Keys that are used together are joined with '+'. Correct example according to this guide: Ctrl+Shift+?. Some companies add bold face to this, e.g. **Ctrl+Shift+?**. In my experience this is especially common if the documentation also refers to UI elements like menu names. I think the reasoning is that "user-entered stuff" should look the same whether it's **Ctrl+Z** or **File-\>Open**. I have sometimes seen a hyphen used in place of '+': Ctrl-Z, for example. I don't know the origin of this style. I recommend _against_ using a fixed-width font. In technical writing this style is usually reserved for console output, code, code elements like function names, and sometimes environment variables -- things you would expect to see in a terminal window, error log, or editor window, in other words.