You only need to create this script if you don't have a default 101 keys US keyboard layout.
Create the /etc/init.d/loadkeys script by running the following command:
cat > /etc/init.d/loadkeys << "EOF" #!/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 EOF
Create a new file /etc/sysconfig/keyboard by running the following:
cat > /etc/sysconfig/keyboard << "EOF" # Begin /etc/sysconfig/keyboard LAYOUT=<path-to-keymap> # End /etc/sysconfig/keyboard EOF
Replace <path-to-keymap> with the path to the keymap you have selected. For example, if you have chosen the US keymap, you would replace it with /usr/share/kbd/keymaps/i386/qwerty/us.map.gz.