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