5

How do I enter keystrokes in a pretty printed form?

For example, the keyboard combination CTRL-SHIFT-D in this answer was pretty printed as

keys

6

1 Answer 1

9

The html tag to produce the any key is

<kbd>any</kbd>

Just to clarify:
Stackexchange sites use an extended version of markdown and allows a certain subset of standard html tags. These tags work in questions, answers and tag wikis. Some stackexchange sites (including the Mathematica one) also allow for LaTeX via MathJax (you can thank the guys at mathoverflow for getting this working first).

The comments only allow a small subset of markdown and AFAIK none of the html tags. See the end of this meta.SO answer.

For examples of some more extreme uses of the allowed markdown, see the meta.SO sandbox

5
  • I have to try it: <kbd>test</kbd>. Jan 19, 2012 at 15:36
  • It seems that it does not work on my end. Jan 19, 2012 at 17:58
  • It might only work in an answer field?
    – Eli Lansey
    Jan 19, 2012 at 20:56
  • 2
    @IstvánZachar: as noted in the recent edit of this answer, only a limited subset of markup works in comments.
    – Isaac
    Jan 20, 2012 at 2:51
  • Thanks Isaac, I read it as well. Jan 20, 2012 at 9:07

You must log in to answer this question.

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