loadkeys.xml 1.5 KB

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