loadkeys.xml 1.6 KB

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