mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-01-19 21:49:13 +00:00
e12115e329
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@1268 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
62 lines
1.5 KiB
XML
62 lines
1.5 KiB
XML
<sect1 id="ch07-loadkeys">
|
|
<title>Creating the loadkeys script</title>
|
|
<?dbhtml filename="loadkeys.html" dir="chapter07"?>
|
|
|
|
<para>You only need to create this script if you don't have a
|
|
default 101 keys US keyboard layout.</para>
|
|
|
|
<para>Create the <filename>/etc/init.d/loadkeys</filename> script by
|
|
running the following command:</para>
|
|
|
|
<para><screen><userinput>cat > /etc/init.d/loadkeys << "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>/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 > /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
|
|
<userinput>/usr/share/kbd/keymaps/i386/qwerty/us.map.gz</userinput></para>
|
|
|
|
</sect2>
|
|
|
|
</sect1>
|
|
|