home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.os.linux.gentoo      Stupid OS you gotta compile EVERYTHING      17,684 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 16,109 of 17,684   
   pk to Aragorn   
   Re: Locales confusion   
   25 Feb 08 10:59:35   
   
   From: pk@pk.pk   
      
   Aragorn wrote:   
      
   > I seem to have run into another little mystery here for which neither the   
   > documentation nor Google provide any useful help...   
   >   
   > In the file */etc/conf.d/keymaps,* there is a variable /EXTENDED_KEYMAPS./   
   > By default it is set to "", but an alternative value underneath which is   
   > commented out lists "backspace keypad euro" as example values.   
   >   
   > Can anyone tell me what those values mean, or at least what "backspace"   
   > and "keypad" mean there?  (I suppose I know what "euro" means.)   
      
   Whatever you put into EXTENDED_KEYMAPS is passed as an argument to loadkeys.   
   This is the relevant line from the /etc/init.d/keymaps script (which loads   
   the keymaps for the console only, not for X window):   
      
     ebegin "Loading key mappings"   
     if [[ -x /bin/loadkeys ]] ; then   
       [[ ${SET_WINDOWKEYS} == "yes" ]] && WINDOWKEYS_KEYMAP="windowkeys"   
       /bin/loadkeys -q ${WINDOWKEYS_KEYMAP} ${KEYMAP} \   
                        ${EXTENDED_KEYMAPS} > /dev/null   
       eend $? "Error loading key mappings"   
     else   
       eend 1 "/bin/loadkeys not found"   
       return 1   
     fi   
      
   Essentially, the arguments to loadkeys are filenames of console map files,   
   generally found under /usr/share/keymaps/ (where , for normal   
   PCs - either x86 or amd64 - is "i386").   
      
   So, as an example, using this configuration:   
      
   KEYMAP="be-latin1"   
   EXTENDED_KEYMAPS="euro backspace keypad"   
      
   will result in the following command being executed by the initscript:   
      
   /bin/loadkeys -q be-latin1 euro backspace keypad   
      
   which will load the following keymap files:   
      
   /usr/share/keymaps/i386/azerty/be-latin1.map.gz   
   /usr/share/keymaps/i386/include/euro.map.gz   
   /usr/share/keymaps/i386/include/backspace.map.gz   
   /usr/share/keymaps/i386/include/keypad.map.gz   
      
   (You can do   
      
   ls /usr/share/keymaps/i386/{azerty,dvorak,fgGIod,include,qwerty,qwertz}   
      
   and see for yourself what keymaps are available)   
      
   The keymaps located in include/ are not full keymaps; they just define some   
   extra keys, like, for instance, the euro key or the backspace key, which   
   complement the main keymap. And yes, they are plain text files, so you can   
   see what they do (if not already apparent by their name). For example, this   
   is /usr/share/keymaps/i386/include/euro.map.gz:   
      
   $ zcat /usr/share/keymaps/i386/include/euro.map.gz   
   # Euro and cent   
   # [Say: "loadkeys euro" to get Euro and cent with Alt on the positions   
   #  where many keyboards have E and C.   
   #  To get it displayed, use a latin0 (i.e., latin9) font.]   
   alt keycode  18 = currency   
   alt keycode  46 = cent   
      
   So, using EXTRA_KEYMAPS="euro" will give you the "€" and "¢" symbols in   
   console, provided you use a font that can render them.   
      
   In my experience, using "backspace" in EXTRA_KEYMAPS is useless, since most   
   keymaps already define that key themselves.   
      
   Hope this helps.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca