LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Xkb customization (and xmodmap) (https://www.linuxquestions.org/questions/linux-general-1/xkb-customization-and-xmodmap-495381/)

ArmandoRampas 10-25-2006 05:49 AM

Xkb customization (and xmodmap)
 
Hi,

I use the us (intl) variant as xkb keymap. It suits almost all my needs, except
in two things:

1. The standard variant provided by Xorg does not include the symbol "periodcentered" (·,code 0x0b7), which I sometimes need when I write in catalan.

2. Since I use vi and tend to use "Escape" a lot, I find it convenient swap the <CAPS> and <ESC> keys (the caps-lock key falls much closer than the "Esc" key).

My question is how can I customize the keymapping, assuming that I want to stick to the 'xkb way' (instead of using xmodmap)?

I know how to modify the file /etc/X11/xkb/symbols/us to obtain what I want:

// Make 'periodcentered' appear
key <AB09> { [ period, greater ],
[periodcentered, dead_caron ] };
// I have substituted deadabovedot by periodcentered. The choice of this
// key (AB09) is arbitrary
..
// Exchange Esc and Caps
key <CAPS> { [ Escape ] };
key <ESC> { [ Caps_Lock ] };

The problem is that I modify the original 'us' file, which is very bad (I must be root to do it and the modified file will be replaced on every update).

A intermediate solution was to create a new 'symbols' file called "us_personal" (or whatever), which was a copy of the original plus these minor modifications. It was fine (now it isn't I don't know why), but it was an ugly fix. I wonder if there is any possibility to have a personal keymap configuration, in the spirit of the "~/.xmodmap" file but within the xkb system. If there is no such possibility I would like to hear any suggestions about what to do.

In any case, and as a last resource, I'll always have xmodmap (everyone says it is obsolete but everyone seems to use it :)

! Swap Esc and Caps_Lock
remove Lock = Caps_Lock
keysym Escape = Caps_Lock
keysym Caps_Lock = Escape
add Lock = Caps_Lock
! Add the periodcentered
...

Thanks a lot for your attention and help,

Dani


All times are GMT -5. The time now is 03:13 AM.