libkeymap: Do not dump diacr values if lk_dump_keymap called
[platform/upstream/kbd.git] / doc / kbd.FAQ-8.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2 <HTML>
3 <HEAD>
4  <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
5  <TITLE>The Linux keyboard and console HOWTO: Ctrl-Alt-Del and other special key combinations</TITLE>
6  <LINK HREF="kbd.FAQ-9.html" REL=next>
7  <LINK HREF="kbd.FAQ-7.html" REL=previous>
8  <LINK HREF="kbd.FAQ.html#toc8" REL=contents>
9 </HEAD>
10 <BODY>
11 <A HREF="kbd.FAQ-9.html">Next</A>
12 <A HREF="kbd.FAQ-7.html">Previous</A>
13 <A HREF="kbd.FAQ.html#toc8">Contents</A>
14 <HR>
15 <H2><A NAME="s8">8. Ctrl-Alt-Del and other special key combinations</A></H2>
16
17 <P>
18 <P>
19 <H2><A NAME="ss8.1">8.1 Ctrl-Alt-Del (Boot)</A>
20 </H2>
21
22 <P>
23 <!--
24 ctrl-alt-del!action taken by
25 -->
26 <P>If you press Ctrl-Alt-Del (or whatever key was assigned the keysym Boot by
27 loadkeys) then either the machine reboots immediately (without sync), or
28 <CODE>init</CODE> is sent a SIGINT. The former behaviour is the default. The default
29 can be changed by root, using the system call reboot(), see ctrlaltdel(8).
30 Some <CODE>init</CODE>'s change the default. What happens when <CODE>init</CODE> gets SIGINT depends
31 on the version of <CODE>init</CODE> used - often it will be determined by the pf entry in
32 <CODE>/etc/inittab</CODE> (which means that you can run an arbitrary program
33 in this case).
34 In the current kernel Ctrl-AltGr-Del is no longer by default assigned to Boot.
35 <P>
36 <H2><A NAME="ss8.2">8.2 Other combinations</A>
37 </H2>
38
39 <P>
40 <!--
41 keyboard!special key combinations
42 -->
43
44 <!--
45 key combinations, special
46 -->
47 <P>
48 <PRE>
49 Name            Default binding
50 -------------------------------
51 Show_Memory     Shift-Scrollock
52 Show_Registers  AltGr-ScrollLock
53 Show_State      Ctrl-ScrollLock
54 Console_n       Alt-Fn and Ctrl-Alt-Fn  (1 &lt;= n &lt;= 12)
55 Console_{n+12}  AltGr-Fn                (1 &lt;= n &lt;= 12)
56 Incr_Console    Alt-RightArrow
57 Decr_Console    Alt-LeftArrow
58 Last_Console    Alt[Gr]-PrintScreen
59 Scroll_Backward Shift-PageUp
60 Scroll_Forward  Shift-PageDown
61 Caps_On                                 (CapsLock is a toggle; this key sets)
62 Compose         Ctrl-.
63 </PRE>
64 <P>
65 <H2><A NAME="ss8.3">8.3 X Combinations</A>
66 </H2>
67
68 <P>
69 <!--
70 keyboard!key combinations for X
71 -->
72
73 <!--
74 key combinations, X
75 -->
76
77 <!--
78 X!key combinations for
79 -->
80 <P>
81 <PRE>
82 Ctrl-Alt-Fn     Switch to VT n
83 Ctrl-Alt-KP+    Next mode
84 Ctrl-Alt-KP-    Previous mode
85 Ctrl-Alt-Backspace      Kill X
86 </PRE>
87
88 On some motherboards, Ctrl-Alt-KP- and Ctrl-Alt-KP+ will be equivalent to
89 pressing the Turbo button. That is, both will produce the scancodes
90 1d 38 4a ca b8 9d and 1d 38 4e ce b8 9d, and both will switch between
91 Turbo (&gt;= 25MHz) and non-Turbo (8 or 12 MHz).
92 (Often these key combinations only function this way when enabled
93 by jumpers on the motherboard.)
94 <P>Perry F Nguyen (<CODE>pfnguyen@netcom22.netcom.com</CODE>) writes:
95 AMI BIOS has a feature that locks up the keyboard and flashes the LED's
96 if the Ctrl-Alt-Backspace combination is pressed while a BIOS password
97 is enabled, until the CMOS/BIOS password is typed in.
98 <P>On some SiS based motherboards the combination Ctrl-Alt-Backspace
99 will cause a power off, or puts the machine in power save mode.
100 (Reported for SiS 630 and for SiS645DX.)
101 <P>
102 <H2><A NAME="ss8.4">8.4 Dosemu Combinations</A>
103 </H2>
104
105 <P>
106 <!--
107 key combinations!dosemu
108 -->
109
110 <!--
111 dosemu!key combinations for
112 -->
113 <P>
114 <PRE>
115 Ctrl-Alt-Fn     Switch to VT n (from version 0.50; earlier Alt-Fn)
116 Ctrl-Alt-PgDn   Kill dosemu (when in RAW keyboard mode)
117 (and many other combinations - see the dosemu documentation)
118 </PRE>
119 <P>
120 <H2><A NAME="ss8.5">8.5 Composing symbols</A>
121 </H2>
122
123 <P>
124 <!--
125 keyboard!composing symbols with
126 -->
127
128 <!--
129 symbols!composing with keyboard
130 -->
131 <P>One symbol may be constructed using several keystrokes.
132 <UL>
133 <LI>LeftAlt-press, followed by a decimal number typed on the keypad, followed
134 by LeftAlt-release, yields the symbol with code given by this number.
135 (In Unicode mode this same mechanism, but then with 4 hexadecimal digits,
136 may be used to define a Unicode symbol.)</LI>
137 <LI>A dead diacritic followed by a symbol, yields that symbol adorned with
138 that diacritic. If the combination is undefined, both keys are taken
139 separately.
140 Which keys are dead diacritics is user-settable; none is by default.
141 Five (since 2.0.25 six) dead diacritics can be defined (using loadkeys(1)):
142 dead_grave, dead_acute, dead_circumflex, dead_tilde, dead_diaeresis
143 (and dead_cedilla).
144 Precisely what this adorning means is also user-settable:
145 dead-diacritic, symbol is equivalent to Compose + diacritic + symbol.</LI>
146 <LI>Compose followed by two symbols yields a combination symbol. These
147 combinations are user-settable. Today there are 68 combinations
148 defined by default; you can see them by saying "dumpkeys | grep compose".</LI>
149 <LI>Then there are `Sticky' modifier keys (since 1.3.33). For example,
150 one can type Ctrl-C as SControl, C and Ctrl-Alt-BackSpace as SControl,
151 SAlt, BackSpace.</LI>
152 </UL>
153 <P>Note that there are at least four such composition mechanisms:
154 <OL>
155 <LI>The Linux keyboard driver mechanism, used in conjunction with loadkeys.</LI>
156 <LI>The X mechanism - see X386keybd(1), later XFree86kbd(1).
157 Under X11R6: edit <CODE>/usr/X11R6/lib/X11/locale/iso8859-1/Compose</CODE>.<P>See also Andrew D. Balsa's comments at
158 <A HREF="http://wauug.erols.com/~balsa/linux/deadkeys/index.html">http://wauug.erols.com/~balsa/linux/deadkeys/index.html</A>.
159 </LI>
160 <LI>The emacs mechanism obtained by loading "iso-insert.el" or
161 calling `iso-accents-mode'.</LI>
162 <LI>The vim mechanism: insert a composed symbol by pressing Ctrl-K
163 followed by two symbols. A list of the possible combinations is
164 obtained by the command <CODE>:digraphs</CODE>.</LI>
165 </OL>
166
167 For X the order of the two symbols is arbitrary: both Compose-,-c and
168 Compose-c-, yield a c-cedilla; for Linux and emacs only the former sequence
169 works by default. For X and vim the list of compose combinations is fixed.
170 Linux and emacs are flexible.
171 The default lists are somewhat similar, but the details are different.
172 <P>
173 <H2><A NAME="ss8.6">8.6 The SysRq key</A>
174 </H2>
175
176 <P>
177 <!--
178 SysRq key
179 -->
180
181 In case your kernel was compiled with CONFIG_MAGIC_SYSRQ enabled
182 (a feature that is present since Linux 2.1.43)
183 there is a single key (defined in <CODE>&lt;linux/keyboard.h&gt;</CODE>)
184 to which special system functions are attached, regardless of the
185 current keyboard mode. For the PC architecture this special key is,
186 naturally, the Alt+SysRq key, and any of the two Alt keys will work.
187 (Note that if CONFIG_MAGIC_SYSRQ was not enabled, the default action
188 of this key is to return to the previous console.)
189 <P>If you press this key, do not release it, and hit another key,
190 a corresponding action is performed. The action is performed whether
191 anybody is logged in or not, is root or not. For the details, see
192 <CODE>drivers/char/sysrq.c</CODE>. Since this feature is meant only
193 for kernel hackers, that should suffice. Still, let me add a few
194 remarks.
195 <P>For the key r the keyboard mode is reset to K_XLATE.
196 For the key k a SAK and console reset is done.
197 For the key b the machine is rebooted immediately.
198 (See, not something you want to have enabled on a production machine.)
199 For the key o the power is turned off (when the machine is capable of that).
200 For the key s an emergency sync is scheduled.
201 For the key u an emergency read-only remount is scheduled.
202 For the keys p,t,m various information is shown
203 (namely the same information also shown for RAlt,RCtrl,RShift+ScrollLock).
204 For the keys e,i,l all processes get a SIG_TERM or SIG_KILL, respectively;
205 for l even the init process is killed.
206 Digits set the log level. Anything else prints a short summary:
207 <CODE>SysRq: unRaw saK Boot Off Sync Unmount showPc showTasks showMem
208 loglevel0-8 tErm kIll killalL</CODE>.
209 <P>Note: These are very dangerous actions! And they do not use your
210 keymap - indeed, are meant for emergency cases where the state
211 of your keymap, or even of the entire kernel, is uncertain.
212 If you use a dvorak keyboard - bad luck! Most other people will
213 be able to survive: the dangerous letters A,M,Q,W,Y,Z that are
214 differently placed on English, French and German keyboards, are
215 not used for actions. (But if your finger slips and you hit L
216 instead of K - bye bye to your system.)
217 <P>In Linux 2.3.13 the possibility to enable/disable SysRq was added.
218 <BLOCKQUOTE><CODE>
219 <PRE>
220         echo 0 > /proc/sys/kernel/sysrq
221 </PRE>
222 </CODE></BLOCKQUOTE>
223
224 will disable it (if the kernel was compiled with CONFIG_MAGIC_SYSRQ).
225 <P>
226 <H2><A NAME="ss8.7">8.7 Problems</A>
227 </H2>
228
229 <P>A good keyboard accurately reports multiple key presses.
230 Especially for people using a keyboard as Braille input device,
231 where they have to be able to press up to six keys simultaneously,
232 this is important. Many modern keyboards fail here due to sloppy
233 design and testing - they misreport or fail in other ways when
234 four or more keys are pressed simultaneously, sometimes already
235 when two non-modifier keys are pressed simultaneously.
236 This affects Linux users a bit: the SysRq key is not a modifier key,
237 and people report problems using Alt-SysRq-<I>X</I> for various
238 letters or digits <I>X</I>.
239 <P>Long ago a similar problem (`ghosting') was caused by the design
240 of the scan matrix: when three keys were pressed a fourth was
241 also seen. That problem was solved by the use of diodes.
242 Today it is the interface logic that is deficient.
243 <P>
244 <HR>
245 <A HREF="kbd.FAQ-9.html">Next</A>
246 <A HREF="kbd.FAQ-7.html">Previous</A>
247 <A HREF="kbd.FAQ.html#toc8">Contents</A>
248 </BODY>
249 </HTML>