~ubuntu-branches/ubuntu/gutsy/kbd/gutsy

« back to all changes in this revision

Viewing changes to doc/kbd.FAQ-9.html

  • Committer: Package Import Robot
  • Author(s): Wartan Hachaturow
  • Date: 2002-01-30 14:01:28 UTC
  • Revision ID: package-import@ubuntu.com-20020130140128-0nb81lp1w40oz0ma
Tags: 1.06-2
* Changed Maintainer: field to wart@debian.org
* Applied patch by Ben Collins, (Closes: #110616)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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: How to get out of raw mode</TITLE>
 
6
 <LINK HREF="kbd.FAQ-10.html" REL=next>
 
7
 <LINK HREF="kbd.FAQ-8.html" REL=previous>
 
8
 <LINK HREF="kbd.FAQ.html#toc9" REL=contents>
 
9
</HEAD>
 
10
<BODY>
 
11
<A HREF="kbd.FAQ-10.html">Next</A>
 
12
<A HREF="kbd.FAQ-8.html">Previous</A>
 
13
<A HREF="kbd.FAQ.html#toc9">Contents</A>
 
14
<HR>
 
15
<H2><A NAME="s9">9. How to get out of raw mode</A></H2>
 
16
 
 
17
<P>
 
18
<!--
 
19
raw mode, exiting
 
20
-->
 
21
<P>If some program using K_RAW keyboard mode exits without restoring the keyboard
 
22
mode to K_XLATE, then it is difficult to do anything - not even Ctrl-Alt-Del
 
23
works. However, it is sometimes possible to avoid hitting the reset button.
 
24
(And desirable as well: your users may get angry if you kill their Hack game
 
25
by rebooting; you might also damage your file system.)
 
26
Easy solutions involve logging in from another terminal or another machine
 
27
and doing <CODE>kbd_mode -a</CODE>.
 
28
The procedure below assumes that no X is running, that the display is in
 
29
text mode, and that you are at your bash prompt, that you are using a US
 
30
keyboard layout, and that your interrupt character is Ctrl-C.
 
31
<P>Step 1. Start X.
 
32
As follows: press 2 (and don't release), press F12 (and don't release)
 
33
and immediately afterwards press = . This starts X.
 
34
(Explanation: if a key press produces keycode K, then the key release
 
35
produces keycode K+128. Probably your shell does not like these high
 
36
characters, so we avoid generating them by not releasing any key.
 
37
However, we have to be quick, otherwise key repeat starts. The digit 2
 
38
produces a Ctrl-C that discards previous junk, the F12 produces an X
 
39
and the = a Return.)
 
40
Probably your screen will be grey now, since no <CODE>.xinitrc</CODE> was specified.
 
41
However, Ctrl-Alt-Fn will work and you can go to another VT.
 
42
(Ctrl-Alt-Backspace also works, but that exits X, and gets you back into
 
43
the previous state, which is not what you want.)
 
44
<P>Step 2. Setup to change the keyboard mode.
 
45
(For example, by <CODE>sleep 5; kbd_mode -a</CODE>.)
 
46
<P>Step 3. Leave X again.
 
47
Alt-Fx (often Alt-F7) brings you back to X, and then Ctrl-Alt-Backspace
 
48
exits X. Within 5 seconds your keyboard will be usable again.
 
49
<P>If you want to prepare for the occasion, then make
 
50
<CODE>\215A\301</CODE> (3 symbols) an alias for <CODE>kbd_mode -a</CODE>.
 
51
Now just hitting = F7 = (3 symbols) will return you to sanity.
 
52
<P>
 
53
<HR>
 
54
<A HREF="kbd.FAQ-10.html">Next</A>
 
55
<A HREF="kbd.FAQ-8.html">Previous</A>
 
56
<A HREF="kbd.FAQ.html#toc9">Contents</A>
 
57
</BODY>
 
58
</HTML>