1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
|
%%
%%% Author 1997 Werner Fink <werner@suse.de>
%%% Copyright (c) 1997 SuSE GmbH Nuernberg, Germany.
%%
%% Based on `susemac.sty' v 1.30 1997/10/14
%% Some modifications by Rolf Niepraschk <niepraschk@ptb.de>, 2000/10/29
%%
%% keystroke.sty is free software; you can redistribute it and/or modify
%% it under the terms of the GNU General Public License as published by
%% the Free Software Foundation; either version 2, or (at your option)
%% any later version.
%%
%% keystroke.sty is distributed in the hope that it will be useful,
%% but WITHOUT ANY WARRANTY; without even the implied warranty of
%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
%% GNU General Public License for more details.
%%
%% You should have received a copy of the GNU General Public License
%% along with keystroke.sty; see the file COPYING; if not, write to
%% the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
%% Boston, MA 02111-1307 USA.
%%
% Please send corrections and enhancements
% to Rolf Niepraschk <niepraschk@ptb.de>.
% Changes:
% v1.3, 2001/10/27; Loading the graphics package only if needed.
% All unknown options are options for `graphics'.
% v1.4, 2001/12/14; New and corrected definitions for spanish.
% v1.5, 2003/08/15; Fix a bug with the global option "english".
% New optin "ngerman". RN
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{keystroke}[2003/08/15 v1.5 3D keystrokes (SuSE GmbH/RN)]
\@ifpackageloaded{graphics}{}{%
\RequirePackage{graphics}
%\RequirePackage{graphicx}
}
\newcommand*{\Enter}{}
\newcommand*{\Del}{}
\newcommand*{\Ins}{}
\newcommand*{\Esc}{}
\newcommand*{\Shift}{}
\newcommand*{\Ctrl}{}
\newcommand*{\Home}{}
\newcommand*{\End}{}
\newcommand*{\PgUp}{}
\newcommand*{\PgDown}{}
\newcommand*{\PrtSc}{}
\newcommand*{\Scroll}{}
\newcommand*{\Break}{}
\DeclareOption{english}{%
\def\Enter{\keystroke{Enter}}
\def\Del{\keystroke{Del}}
\def\Ins{\keystroke{Ins}}
\def\Esc{\keystroke{Esc}}
\def\Shift{\keystroke{Shift $\Uparrow$}}
\def\Ctrl{\keystroke{Ctrl}}
\def\Home{\keystroke{Home}}
\def\End{\keystroke{End}}
\def\PgUp{\keystroke{Page $\uparrow$}}
\def\PgDown{\keystroke{Page $\downarrow$}}
\def\PrtSc{\keystroke{PrtSc}}
\def\Scroll{\keystroke{Scroll}}
\def\Break{\keystroke{Break}}
}
\DeclareOption{american}{\ExecuteOptions{english}}
\DeclareOption{german}{%
\def\Del{\keystroke{Entf}}
\def\Ins{\keystroke{Einfg}}
\def\Esc{\keystroke{Esc}}
\def\Shift{\keystroke{$\Uparrow$~~}}
\def\Ctrl{\keystroke{Strg}}
\def\Home{\keystroke{Pos1}}
\def\End{\keystroke{Ende}}
\def\PgUp{\keystroke{Bild $\uparrow$}}
\def\PgDown{\keystroke{Bild $\downarrow$}}
\def\PrtSc{\keystroke{Druck}}
\def\Scroll{\keystroke{Rollen}}
\def\Break{\keystroke{Pause}}
}
\DeclareOption{germanb}{%
\typeout{******Please use `german' instead of `germanb'******}%
\ExecuteOptions{german}
}
\DeclareOption{ngerman}{%
\ExecuteOptions{german}
}
\DeclareOption{french}{%
\def\Enter{\keystroke{Entr\'ee}}
\def\Del{\keystroke{Suppr}}
%\def\Ins{\keystroke{???}}
\def\End{\keystroke{Fin}}
\def\PgUp{\keystroke{Pagina $\uparrow$}}
\def\PgDown{\keystroke{Pagina $\downarrow$}}
}
\DeclareOption{francais}{%
\typeout{******Please use `french' instead of `francais'*****}%
\ExecuteOptions{french}
}
% Contributed by Arndt Mehlhorn <mehlhorn@Techno-Sol.com>
\DeclareOption{spanish}{%
\def\Enter{\keystroke{Enter}}
\def\Esc{\keystroke{Esc}}
\def\Del{\keystroke{Supr}}
\def\Ins{\keystroke{Insert}}
\def\End{\keystroke{Fin}}
\def\PgUp{\keystroke{Re P\'ag}}
\def\PgDown{\keystroke{Av P\'ag}}
\def\PrtSc{\keystroke{Impr Pant}}
\def\Scroll{\keystroke{Bloq Despl}}
\def\Break{\keystroke{Pausa}}
\def\End{\keystroke{Fin}}
\def\Home{\keystroke{Inicio}}
}
\DeclareOption*{%
\PassOptionsToPackage{\CurrentOption}{graphics}%
}
\ExecuteOptions{english}
\ProcessOptions\relax
\newcommand*{\suse@tab}{%
\raisebox{-.5ex}{\shortstack{\reflectbox{\suse@@tab}\\[-1ex]\suse@@tab}}%
}
\newcommand*{\suse@@tab}{%
{{\makebox[2em]{\small\rightarrowfill}}}%
}
\newcommand*{\Spacebar}{\keystroke{\hspace{3.5em}}}
\newcommand*{\Return}{\keystroke{$\hookleftarrow$}}
\newcommand*{\BSpace}{\keystroke{\reflectbox{$\longmapsto$}}}
%\newcommand*{\Tab}{\keystroke{$\longmapsto$}}
\newcommand*{\Tab}{\keystroke{\suse@tab}}
\newcommand*{\Alt}{\keystroke{Alt}}
\newcommand*{\AltGr}{\keystroke{AltGr}}
\newcommand*{\NumLock}{\keystroke{Num}}
\newcommand*{\UArrow}{\keystroke{$\,\uparrow\!$}}
\newcommand*{\DArrow}{\keystroke{$\,\downarrow\!$}}
\newcommand*{\LArrow}{\keystroke{$\leftarrow$}}
\newcommand*{\RArrow}{\keystroke{$\rightarrow$}}
%%
\newbox\suse@key
\newbox\keystroke@left
\newbox\keystroke@right
\newbox\keystroke@middle
\setbox\keystroke@left =\hbox{\includegraphics{keystroke_left}}
\setbox\keystroke@middle=\hbox{\includegraphics{keystroke_middle}}
\setbox\keystroke@right =\hbox{\includegraphics{keystroke_right}}
%
\def\suse@keystr@ke#1{\ %
\ifvmode\leavevmode\fi{\obeyspaces%
\global\setbox\suse@key=\hbox{{\keystroke@font\strut#1}}%
\@tempdima=0.35ex%
\advance\@tempdima by \dp\suse@key%
\@tempdimb=\wd\suse@key%
\@tempdimc=\ht\suse@key%
\ifdim\@tempdimb<\@tempdimc\@tempdimb=\@tempdimc\fi
\advance\@tempdimc by 1.16ex%
\lower\@tempdima\hbox{\resizebox*{!}{\@tempdimc}{\copy\keystroke@left}}%
\ignorespaces%
\hbox to 0pt{\unhbox\suse@key\hss}%
\ignorespaces%
\lower\@tempdima\hbox to \@tempdimb{\hss%
\resizebox*{\@tempdimb}{\@tempdimc}{\copy\keystroke@middle}}%
\ignorespaces%
\lower\@tempdima\hbox{\resizebox*{!}{\@tempdimc}{\copy\keystroke@right}}%
}\ }
%
\DeclareRobustCommand*\keystroke{\suse@keystr@ke}
\newcommand*\keystroke@font{\normalfont\sffamily\footnotesize}
%%
\endinput
|