loadkeys.xml 1.5 KB

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