J.C. Roberts wrote:
> On Sun, 10 Jan 2010 11:35:23 -0700 Anthony Bentley
> <anthonyjbent...@gmail.com> wrote:
> 
>> On Sun, Jan 10, 2010 at 11:24:04AM +0100, Alexander Hall wrote:
>>> That said, i tried to make Caps_Lock be my compose key but to no
>>> avail.
>>>
>>> $ xmodmap -e 'clear Lock'          # get rid of caps lock annoyance
>>> $ setxkbmap -option compose:caps   # damn it, caps lock is back...
>>>
>>> Hints highly appreciated. For example; where are the -option's
>>> documented?
>>>
>> I wouldn't call this "documentation," but it looks like most or all
>> (?) XkbOptions are listed in the /etc/X11/xkb/rules/xorg.lst file.
>> compose:caps is not in the list, but I don't know if this is complete
>> or not.
> 
> Actually, it's far more convoluted than that. :-)
> 
> I wasn't exactly certain what Alexander wanted to do, but I'm *guessing*
> he wants to enable the 'compose' feature on CapsLock key in the 'se'
> layout.

I wanted to have a common compose key for both the us and se layouts
that would not kill my ability to use AltGr (which is rather essential
in the se layout). However, the se layout already allows me to compose
just about any "special" character I ever need, so its not essential to
have the extra compose functionality there.

Thus, since I just realized that a simple "setxkbmap -option" would
revert the option (or rather all options, but this is the only one I
have), I could just use

$ setxkbmap se && setxkbmap -option

for an ordinary se layout, or

$ setxkbmap us && setxkbmap -option compose:ralt

for the us one, with compose on AltGr.

> You can see the 'compose' symbol mapped to the 'Multi_Key' keysym in:
> 
>       /etc/X11/xkb/symbols/pc104
> 
> If you set your system to use the 'se' layout and dump the entire
> keycode->keysym mapping:
> 
>       $ setxkbmap se
>       $ xmodmap -pke
> 
> You'll find that the "Multi_key" keysym is not used in the 'se' layout.
> 
> One of the problems you'll face is the fact that the 'Caps Lock" key is
> setup to be a toggle, so to use it as a normal key, you'll need to
> disable the it.
> 
>       $ xmodmap -e 'clear Lock'
> 
> And now the magic:
> 
>       $ xmodmap -e "keysym Caps_Lock = Multi_key"
> 
> You just over-wrote the "Caps_Lock" keysym with the "Multi_key" keysym,
> so you no longer have a caps lock toggle button, but instead, you now
> have a button that preforms the wanted 'compose' feature. I've tested
> the above with the hardware I have, and it works, but since your
> physical keyboard is a whole lot different than anything I have here,
> your results might vary.

This worked as a charm too.

Thanks!

/Alexander

Reply via email to