Usb keyboard automatic layout

View: New views
1 Messages — Rating Filter:   Alert me  

Usb keyboard automatic layout

by Damian-27 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I often need to use unicode characters when I'm writing in Spanish.
For that purpose I've set up my .Xmodmap in the following way:
    clear Lock
    keycode 66  = Multi_key

After running
    xmodmap ~/.Xmodmap

I can use the caps lock as a multi key in my laptop keyboard. However,
whenever I plug an external usb keyboard, it doesn't have the desired
layout, and I'm forced to run xmodmap again.

How can I do to modify automatically the keyboard layout of an
inserted usb keyboard? (running xmodmap from udev is not an option
because it has no effect at all).

Thanks in advance,
Damian.