LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Installing an alternative keymap manually (https://www.linuxquestions.org/questions/linux-general-1/installing-an-alternative-keymap-manually-592265/)

DavidMcCann 10-16-2007 10:26 AM

Installing an alternative keymap manually
 
I've just written an alternative keyboard file to give me a different set of AltGr combinations for special use. The problem is installing it.

In Gnome, the menu system-preferences-keyboard-layouts allows one to select up to four keyboard layouts, but it does not list the one I've made. My new layout is in /usr/share/X11/xkb/symbols/, and I've entered it in both /usr/share/X11/xkb/rules/base.xml and /usr/share/X11/xkb/rules/base.lst. Evidently Gnome uses its own built-in list of languages and ignores anything else.

So, I need to do it manually. But where is the list of installed keymaps kept? I've looked in obvious (and unlikely) places, but it's the old needle in a haystack situation. /etc/X11/xorg.conf only lists the default keyboard and there's nothing in any ~/. file.

Of course, I could cheat and call my new layout with a name that Gnome can recognise, like Bhutanese, but it would be nice to know how it works.

bigrigdriver 10-17-2007 12:56 PM

If gnome uses the X server keyboard layouts, then you should read these files, they may give you hints on how to set it up.
/etc/X11/xkb/README.config
/etc/X11/xkb/compiled/README

DavidMcCann 10-18-2007 10:51 AM

Where are the keymaps recorded?
 
This is one of those occasions when one wishes for a little standardisation.

On Fedora, /etc/X11 does not contain a /xkb directory. There is a directory /usr/share/X11/xkb, but it doesn't have /compiled or README.config

A search for /compiled leads to /var/lib/xkb/compiled/README which was no help at all. Needless to say, I am not going to search for all the files called README!

My bodge idea doesn't work, either. I tried calling my special keymap Azerbaijani, but Gnome saw through my deception and ignored it.

frenchn00b 10-18-2007 06:26 PM

setxkbmap pl

kstan 10-18-2007 09:20 PM

Hi, I'm quite interested in this topic and I have same problem, However what is the purpose of setxkbmap?

DavidMcCann 10-19-2007 10:45 AM

setxkbmap newmap sets newmap as the current keyboard (try man setxkbmap). However, it also wipes any xmodmap and xbindkeys definitions. If you have a modern multi-media keyboard and have carefully set up the www and play/pause buttons, setxkbmap means they all have to be reset.

I know some people feel clever or virtuous when using the command line rather than the desktop, but the facilities in Gnome are put there for a purpose. The old unix utilities are often incompatible with modern features, as I've found in other contexts.

At setxkbmap did reveal the probable problem, reporting an error in loading the new keyboard. If I can find that, I'll have another go at passing it off as Azerbaijani.


All times are GMT -5. The time now is 09:55 AM.