59

What is the recommended method/syntax for denoting keyboard shortcuts in Stack Exchange questions and answers?

For example, how would you write the following in a less verbose manner?

  • Press ctrl, and press either the minus key or the equals key
  • Ctrl or cmd, and lowercase c
  • Ctrl, alt and a, then ctrl and uppercase l
  • Hold ctrl or cmd while scrolling with the mouse wheel

(Well, the last one isn't strictly a keyboard shortcut)

Return to FAQ index

3 Answers 3

74

Note that you can now do this using the <kbd> tag.

  • Ctrl + - or Ctrl + =

  • Ctrl + C

  • Ctrl + A

  • Ctrl + Shift + L

Obviously you have to watch your line spacing due to the additional height of the line.

3
  • 25
    It almost seems unfair that you get to implement a feature in order to provide the best answer to certain questions. :) Aug 31, 2009 at 19:44
  • 1
    These don't work in comments unfortunately
    – deed02392
    Jan 13, 2020 at 12:07
  • For comments you can simply use Ctrl + -
    – Barreto
    Mar 8, 2023 at 18:50
9

I’d say we do it just like it’s done all over the world since the beginning of time.

  • Ctrl-Minus/=
  • Ctrl-c
  • Ctrl-a Ctrl-L
3
  • 4
    "we do it just like it’s done all over the world since the beginning of time"? With sticks and mud? Oct 20, 2012 at 17:13
  • 1
    Ancient writing techniques included the wedge, the reed stylus, and bone/metal styli: cdli.ox.ac.uk/wiki/doku.php?id=cuneiform_writing_techniques . For those of us in modern times, we can search the internet for keyboards with cuneiform keycaps or use Unicode renderings.
    – David J.
    Dec 26, 2020 at 19:54
  • You guys are very anthropocentric, at the beginning there was energy, lots of it, that's what scientists and religious people said alike.
    – Barreto
    Mar 8, 2023 at 18:47
9

I'd say we do it just like it is done all over the world since the beginning of time:

  • C-- or C-=
  • C-c
  • C-a C-L
  • C-x M-c M-butterfly
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .