[6370fa6] | 1 | <sect1 id="ch07-loadkeys">
|
---|
| 2 | <title>Creating the loadkeys script</title>
|
---|
| 3 |
|
---|
[2ea6929] | 4 | <!--
|
---|
[74ea25b] | 5 | <para>You only need to create this script if you don't have a
|
---|
[2ea6929] | 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>
|
---|
[6370fa6] | 14 |
|
---|
[b822811] | 15 | <para><screen><userinput>cat > loadkeys << "EOF"</userinput>
|
---|
[6370fa6] | 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 |
|
---|
[2ea6929] | 25 | #
|
---|
| 26 | # Include /etc/sysconfig/keyboard which contains the LAYOUT variable
|
---|
| 27 | #
|
---|
| 28 |
|
---|
| 29 | source /etc/sysconfig/keyboard
|
---|
| 30 |
|
---|
[6370fa6] | 31 | #
|
---|
| 32 | # Load the default keymap file
|
---|
| 33 | #
|
---|
| 34 |
|
---|
| 35 | echo -n "Loading keymap..."
|
---|
[2ea6929] | 36 | /bin/loadkeys $LAYOUT 2>/dev/null
|
---|
[6370fa6] | 37 | evaluate_retval
|
---|
| 38 |
|
---|
| 39 | # End /etc/init.d/loadkeys
|
---|
[b822811] | 40 | <userinput>EOF</userinput></screen></para>
|
---|
[6370fa6] | 41 |
|
---|
[2ea6929] | 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 |
|
---|
[6370fa6] | 64 | </sect1>
|
---|
| 65 |
|
---|