1 | <sect1 id="ch07-loadkeys">
|
---|
2 | <title>Creating the loadkeys script</title>
|
---|
3 |
|
---|
4 | <para>You only need to create this script if you don't have a
|
---|
5 | default 101 keys US keyboard layout.</para>
|
---|
6 |
|
---|
7 | <para>Create the <filename>/etc/init.d/loadkeys</filename> script by
|
---|
8 | running the following command:</para>
|
---|
9 |
|
---|
10 | <para><screen><userinput>cat > /etc/init.d/loadkeys << "EOF"</userinput>
|
---|
11 | #!/bin/sh
|
---|
12 | # Begin /etc/init.d/loadkeys
|
---|
13 |
|
---|
14 | #
|
---|
15 | # Include the functions declared in the /etc/init.d/functions file
|
---|
16 | #
|
---|
17 |
|
---|
18 | source /etc/init.d/functions
|
---|
19 |
|
---|
20 | #
|
---|
21 | # Include /etc/sysconfig/keyboard which contains the LAYOUT variable
|
---|
22 | #
|
---|
23 |
|
---|
24 | source /etc/sysconfig/keyboard
|
---|
25 |
|
---|
26 | #
|
---|
27 | # Load the default keymap file
|
---|
28 | #
|
---|
29 |
|
---|
30 | echo -n "Loading keymap..."
|
---|
31 | /bin/loadkeys $LAYOUT 2>/dev/null
|
---|
32 | evaluate_retval
|
---|
33 |
|
---|
34 | # End /etc/init.d/loadkeys
|
---|
35 | <userinput>EOF</userinput></screen></para>
|
---|
36 |
|
---|
37 | <sect2>
|
---|
38 | <title>Creating the /etc/sysconfig/keyboard file</title>
|
---|
39 |
|
---|
40 | <para>Create a new file <filename>/etc/sysconfig/keyboard</filename>
|
---|
41 | by running the following:</para>
|
---|
42 |
|
---|
43 | <para><screen><userinput>cat > /etc/sysconfig/keyboard << "EOF"</userinput
|
---|
44 | >
|
---|
45 | # Begin /etc/sysconfig/keyboard
|
---|
46 |
|
---|
47 | LAYOUT=<path-to-keymap>
|
---|
48 |
|
---|
49 | # End /etc/sysconfig/keyboard
|
---|
50 | <userinput>EOF</userinput></screen></para>
|
---|
51 |
|
---|
52 | <para>Replace <userinput><path-to-keymap></userinput> with the
|
---|
53 | path to the keymap you have selected. For example, if you have chosen the
|
---|
54 | US keymap, you would replace it with
|
---|
55 | <userinput>/usr/share/kbd/keymaps/i386/qwerty/us.map.gz</userinput></para>
|
---|
56 |
|
---|
57 | </sect2>
|
---|
58 |
|
---|
59 | </sect1>
|
---|
60 |
|
---|