Comment 3 for bug 1243642

Revision history for this message
Dirk Schuster (dirk-schuster) wrote :

Hi,

Ryan gave me a hint, how to find a workaround without using ~/.Xmodmap. I describe the solution of my specific problem here, so it might be helpful for someone with a similar problem.

These links helped a lot:
https://help.ubuntu.com/community/Howto%3A%20Custom%20keyboard%20layout%20definitions
http://www.charvolant.org/~doug/xkb/html/node5.html

To use the special € and $ keys of the acer laptop in 13.10:

1. add the scancode-to-keycode mappings to /etc/rc.local

# <Euro>
setkeycodes e033 240
# <Dollar>
setkeycodes e034 241

loadkeys /home/user/.acer.map

2. create the keyboard translation table extension in /home/user/.acer.map containing:

keycode 240 = euro
 shift keycode 240 = cent
keycode 241 = dollar
 shift keycode 241 = onequarter

3. add the xbd_symbols to the symbol definition file you use, e.g.: /usr/share/X11/xkb/symbols/de

// acer Euro und Dollar Spezialtasten
    key <I248> { [ EuroSign, cent ] };
    key <I249> { [ dollar, onequarter ] };

4. optional, if you like to see the keys in the graphical represenation of the keyboard,
    change the appropriate section in the geometry definition file you use, e.g. /usr/share/X11/xkb/geometry/pc

    section "Editing" {
 top= 61;
 left= 312;
 row {
     top= 1;
     key.color= "grey20";
     keys { <INS>, <HOME>, <PGUP> };
 };
        row {
     top= 20;
     key.color= "grey20";
     keys { <DELE>, <END>, <PGDN> };
 };
 row {
     top= 58;
     keys { <I248>, { <UP>, color= "grey20" } , <I249> };
 };
 row {
     top= 77;
     key.color= "grey20";
     keys { <LEFT>, <DOWN>, <RGHT> };
 };
    }; // End of "Editing" section

And now I'm able to switch the keyboard layouts using "gnome-control-center region layouts", too, withour "loosing" the € or $ key of the acer laptop again.

cheers Dirk