aboutsummaryrefslogtreecommitdiffstats
path: root/chapter07/loadkeys.xml
blob: e658955e78961be25f4f945663d85026db249379 (plain)
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
<sect1 id="ch07-loadkeys">
<title>Creating the loadkeys script</title>

<!--
<para>You only need to create this script if you don't have a 
default 101 keys US keyboard layout. 

Because we've scrapped the symbolic link for the default, I assume 
that everyone will need this script?
-->

<para>Create the <filename>/etc/init.d/loadkeys</filename> script by 
running the following command:</para>

<para><screen><userinput>cat &gt; /etc/init.d/loadkeys &lt;&lt; "EOF"</userinput>
#!/bin/sh
# Begin /etc/init.d/loadkeys

#
# Include the functions declared in the /etc/init.d/functions file
#

source /etc/init.d/functions

#
# Include /etc/sysconfig/keyboard which contains the LAYOUT variable
#

source /etc/sysconfig/keyboard

#
# Load the default keymap file
#

echo -n "Loading keymap..."
/bin/loadkeys $LAYOUT 2&gt;/dev/null
evaluate_retval

# End /etc/init.d/loadkeys
<userinput>EOF</userinput></screen></para>

<sect2>
<title>Creating the /etc/sysconfig/keyboard file</title>
 
<para>Create a new file <filename>/etc/sysconfig/keyboard</filename> 
by running the following:</para>
 
<para><screen><userinput>cat &gt; /etc/sysconfig/keyboard &lt;&lt; "EOF"</userinput
>
# Begin /etc/sysconfig/keyboard
 
LAYOUT=&lt;path-to-keymap&gt;
 
# End /etc/sysconfig/keyboard
<userinput>EOF</userinput></screen></para>

<para>Replace <userinput>&lt;path-to-keymap&gt;</userinput> with the
path to the keymap you have selected.  For example, if you have chosen the 
US keymap, you would replace it with 
<userinput>/usr/share/kbd/keymaps/i386/qwerty/us.map.gz.</userinput></para>

</sect2>

</sect1>