[Tex/LaTex] Keyboard Font for LaTeX

fontskeyboard

I'm currently writing a user guide containing a lot of keyboard shortcuts. I'm looking for a "keyboard" font where single characters or special keys (like tab or backspace) appear like the "real" key (i.e. with a box around; hope you get the idea).

Is there any package available for this or do I have to wrap one of the existing PS/TTF Fonts?

Best Answer

The keystroke package is your friend.


Update:

Sadeq's suggestion could be mimicked very inexpensively by the pgf/tikZ package.

\documentclass[11pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usetikzlibrary{shadows}

\newcommand*\keystroke[1]{%
  \tikz[baseline=(key.base)]
    \node[%
      draw,
      fill=white,
      drop shadow={shadow xshift=0.25ex,shadow yshift=-0.25ex,fill=black,opacity=0.75},
      rectangle,
      rounded corners=2pt,
      inner sep=1pt,
      line width=0.5pt,
      font=\scriptsize\sffamily
    ](key) {#1\strut}
  ;
}

\begin{document}
  The quick brown fox jumps over the lazy dog.
  \keystroke{Strg} The quick brown fox jumps over the lazy dog.
  \keystroke{Ctrl} The quick brown fox jumps over the lazy dog.
  \keystroke{Page $\uparrow$} \keystroke{Esc} \keystroke{F1}
\end{document}

enter image description here