2001-01-24 00:31:17 +00:00
|
|
|
<sect1 id="ch07-loadkeys">
|
|
|
|
<title>Creating the loadkeys script</title>
|
2001-09-26 01:35:10 +01:00
|
|
|
<?dbhtml filename="loadkeys.html" dir="chapter07"?>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2001-08-05 08:26:23 +01:00
|
|
|
<para>You only need to create this script if you don't have a
|
2001-08-29 20:50:53 +01:00
|
|
|
default 101 keys US keyboard layout.</para>
|
2001-08-06 12:00:11 +01:00
|
|
|
|
|
|
|
<para>Create the <filename>/etc/init.d/loadkeys</filename> script by
|
|
|
|
running the following command:</para>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2001-08-09 17:43:10 +01:00
|
|
|
<para><screen><userinput>cat > /etc/init.d/loadkeys << "EOF"</userinput>
|
2001-01-24 00:31:17 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# Begin /etc/init.d/loadkeys
|
|
|
|
|
|
|
|
#
|
|
|
|
# Include the functions declared in the /etc/init.d/functions file
|
|
|
|
#
|
|
|
|
|
|
|
|
source /etc/init.d/functions
|
|
|
|
|
2001-08-06 12:00:11 +01:00
|
|
|
#
|
|
|
|
# Include /etc/sysconfig/keyboard which contains the LAYOUT variable
|
|
|
|
#
|
|
|
|
|
|
|
|
source /etc/sysconfig/keyboard
|
|
|
|
|
2001-01-24 00:31:17 +00:00
|
|
|
#
|
|
|
|
# Load the default keymap file
|
|
|
|
#
|
|
|
|
|
|
|
|
echo -n "Loading keymap..."
|
2001-08-06 12:00:11 +01:00
|
|
|
/bin/loadkeys $LAYOUT 2>/dev/null
|
2001-01-24 00:31:17 +00:00
|
|
|
evaluate_retval
|
|
|
|
|
|
|
|
# End /etc/init.d/loadkeys
|
2001-07-22 20:45:10 +01:00
|
|
|
<userinput>EOF</userinput></screen></para>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2001-08-06 12:00:11 +01:00
|
|
|
<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 > /etc/sysconfig/keyboard << "EOF"</userinput
|
|
|
|
>
|
|
|
|
# Begin /etc/sysconfig/keyboard
|
|
|
|
|
|
|
|
LAYOUT=<path-to-keymap>
|
|
|
|
|
|
|
|
# End /etc/sysconfig/keyboard
|
|
|
|
<userinput>EOF</userinput></screen></para>
|
|
|
|
|
|
|
|
<para>Replace <userinput><path-to-keymap></userinput> with the
|
|
|
|
path to the keymap you have selected. For example, if you have chosen the
|
|
|
|
US keymap, you would replace it with
|
2001-09-08 01:38:01 +01:00
|
|
|
<userinput>/usr/share/kbd/keymaps/i386/qwerty/us.map.gz</userinput></para>
|
2001-08-06 12:00:11 +01:00
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
2001-01-24 00:31:17 +00:00
|
|
|
</sect1>
|
|
|
|
|