tldr icon indicating copy to clipboard operation
tldr copied to clipboard

question: inconsistencies in keyboard shortcut formatting

Open benboeck opened this issue 7 years ago • 19 comments

Hello, writing a new TLDR client I noticed inconsistencies in the way keyboard shortcuts are formatted.

I am willing to go through the tedious task of preparing a pull request unifying them but want to ask for your agreement on a common style first:


Using a Ctrl shortcut as example, different formats include the following and more:

  • CTRL + K vs. Ctrl + K ("CTRL" in caps or not?)
  • CTRL + K vs. CTRL-K (minus sign, no space)
  • CTRL + K vs. CTRL + k (lower case "k")
  • CTRL + K vs. CTRL + K (format as code or not?)
  • Exotics like <CTRL-K>

The same goes for many other keyboard buttons such as Alt, Tab, Enter and so on.

Some examples of different styles in descriptions:

  1. common/batch (most used style)
    • Execute commands from standard input (press Ctrl + D when finished):
  2. osx/caffeinate (no code formatting, no space, minus sign):
    • Prevent from sleeping until you type Ctrl-C:
  3. common/sl (no code formatting)
    • Let the user exit (CTRL + C):

Some examples of different styles in commands:

  1. common/micro (most used style)
    • Ctrl + K
  2. common/most (angular brackets, minus sign, no space)
    • <CTRL-x> o
  3. common/vimdiff (notice the lower case "w")
    • Ctrl + w {{h|l|k|j}}

Proposal (aligned with currently most used styles):

  1. Use "Ctrl" instead of "CTRL"
  2. Use Ctrl instead of no code formatting (use code formatting)
  3. Use Ctrl + K instead of other formats (use plus sign, use spaces)
  4. Use Ctrl + X, O instead of <CTRL-x> o
  5. Use Ctrl + X instead of Ctrl + x (use upper case)
  6. Use Ctrl + A / Ctrl + B instead of Ctrl + A/Ctrl + B(spaces around "/" look nicer - this is my personal opinion and currently NOT the most used form)
  • Would you agree to some or all of these proposals?
  • Would you be willing to accept a pull request unifying the styles?

Thank you, kind regards

Ben

benboeck avatar Oct 06 '18 14:10 benboeck