WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: customize xorg keymap (solved)  (Read 2947 times)

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
customize xorg keymap (solved)
« on: March 10, 2013, 08:26:09 PM »
I use the command "setxkbmap it &" to set at startup the italian keyboard layout.


I want to change some keys and so I modified this file /usr/local/share/X11/xkb/symbols/it :
Code: [Select]
...
name[Group1]= "Italy - Georgian";
    key <TLDE> { [ backslash, bar, notsign, brokenbar ] };
    key <AE01> { [ 1, exclam, oneinferior, onesuperior ] };
    key <AE02> { [ 2, quotedbl, twoinferior, twosuperior] };
    key <AE03> { [ 3, sterling, threeinferior, threesuperior ] };
    key <AE04> { [ 4, dollar, fourinferior, foursuperior ] };
    key <AE05> { [ 5, percent, fiveinferior, fivesuperior ] };
    key <AE06> { [ 6, ampersand, sixinferior, sixsuperior ] };
    key <AE07> { [ 7, slash, seveninferior, sevensuperior ] };
    key <AE08> { [ 8, parenleft, eightinferior, eightsuperior ] };
    key <AE09> { [ 9, parenright, nineinferior, ninesuperior ] };
    key <AE10> { [ 0, equal, zeroinferior, zerosuperior ] };
    key <AE11> { [apostrophe, question, grave, questiondown ] };
    key <AE12> { [ igrave, asciicircum, asciitilde, dead_circumflex ] };

However, I do not get any results, even restarting xorg, you have any idea?
« Last Edit: March 11, 2013, 11:32:32 PM by vinnie »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: customize xorg keymap
« Reply #1 on: March 11, 2013, 08:04:49 AM »
That file is compiled, and likely cached in /var.

But changing that is not recommended anyway, better to load the normal it keymap and then do your modifications with xmodmap calls (easier to back up, move between distros etc).
The only barriers that can stop you are the ones you create yourself.

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: customize xorg keymap
« Reply #2 on: March 11, 2013, 11:31:44 PM »
Thanks curaga, after many tests I came to this result:

a file placed in ~/.X.d containing
Code: [Select]
#!/bin/sh
xmodmap .xmodmaprc

a file ~/.xmodmaprc containing
Code: [Select]
keycode  10 = 1 exclam      1 exclam        U2081  onesuperior
keycode  11 = 2 quotedbl    2 quotedbl      U2082  twosuperior
keycode  12 = 3 sterling    3 sterling      U2083  threesuperior
keycode  13 = 4 dollar      4 dollar        U2084  foursuperior
keycode  14 = 5 percent     5 percent       U2085  fivesuperior
keycode  15 = 6 ampersand   6 ampersand     U2086  sixsuperior
keycode  16 = 7 slash       7 slash         U2087  sevensuperior
keycode  17 = 8 parenleft   8 parenleft     U2088  eightsuperior
keycode  18 = 9 parenright  9 parenright    U2089  ninesuperior
keycode  19 = 0 equal       0 equal         U2080  zerosuperior

This is all :)