onsdag 28 december 2011

w2d3: Computer setup.

Ported xmodmap-keymap to xkb for docking the laptop.

/usr/share/X11/xkb/rules/evdev.xml:
--- evdev.xml.original 2011-12-31 19:43:12.420620122 +0100
+++ evdev.xml 2011-12-31 19:43:11.776620137 +0100
@@ -4302,6 +4302,12 @@
             <languageList><iso639Id>swl</iso639Id></languageList>
           </configItem>
         </variant>
+        <variant>
+          <configItem>
+            <name>pworak</name>
+            <description>Swedish (Pworak)</description>
+          </configItem>
+        </variant>
       </variantList>
     </layout>
     <layout>
@@ -6322,4 +6328,4 @@
       </option>
     </group>
   </optionList>
/usr/share/X11/xkb/symbols/se:
--- se.original 2011-12-31 19:42:44.772620738 +0100
+++ se 2011-12-31 19:42:44.172620753 +0100
@@ -310,3 +310,74 @@
   key <AE09> { [ 0x110c97b, 0x110c90a, 0x110c98b, 0x110c965 ] };
   key <AE10> { [ 0x110c974, 0x110c909, 0x110c98c, 0x110c968 ] };
 };
+
+partial modifier_keys
+xkb_symbols "pworak_mods" {
+    replace key <CAPS> {  [ Control_L, Control_L ] };
+    modifier_map  Control { <CAPS> };
+
+    // Left control key = F20
+    // Caps = Control_L
+    replace key <AA00> {  [ F20 ] };
+};
+
+partial alphanumeric_keys
+xkb_symbols "pworak" {
+name[Group1]="Swedish (Pworak)";
+
+// don't include in the future
+include "se(basic)"
+include "se(pworak_mods)"
+
+    ///////////////////////////////////////
+    // ^1..90`
+    ///////////////////////////////////////
+    key <TLDE> { [   asciicircum,    onehalf,    paragraph, threequarters] };
+    key <AE04> { [         4,     dollar,   currency ] };
+    key <AE12> { [     acute,      grave,    plusminus,      notsign ] };
+
+    ///////////////////////////////////////
+    // QWERTY
+    ///////////////////////////////////////
+    key <AD01> { [     aring,      Aring,    question      ] };
+    key <AD02> { [  adiaeresis, Adiaeresis,  parenleft          ] };
+    key <AD03> { [ odiaeresis, Odiaeresis,  parenright          ] };
+    key <AD04> { [         p,          P,        thorn,        THORN ] };
+    key <AD05> { [         y,          Y,    leftarrow,          yen ] };
+    key <AD06> { [         f,          F,      dstroke,  ordfeminine ] };
+    key <AD07> { [         g,          G,          eng,          ENG ] };
+    key <AD08> { [         c,          C,    copyright,    copyright ] };
+    key <AD09> { [         r,          R,   registered,   registered ] };
+    key <AD10> { [         l,          L,      lstroke,      Lstroke ] };
+    key <AD11> { [     comma,  semicolon                            ] };
+    key <AD12> { [    slash, asciitilde, dead_ogonek             ] };
+
+    ///////////////////////////////////////
+    // ASDF
+    ///////////////////////////////////////
+    key <AC01> { [         a,          A,    braceleft ] };
+    key <AC02> { [         o,          O,  bracketleft ] };
+    key <AC03> { [         e,          E, bracketright ] };
+    key <AC04> { [         u,          U,   braceright ] };
+    key <AC05> { [         i,          I ] };
+    key <AC06> { [         d,          D ] };
+    key <AC07> { [         h,          H ] };
+    key <AC08> { [         t,          T ] };
+    key <AC09> { [         n,          N ] };
+    key <AC10> { [         s,          S ] };
+    key <AC11> { [     minus, underscore, dead_belowdot, dead_abovedot ] };
+
+    ///////////////////////////////////////
+    // <> ZXCVB
+    ///////////////////////////////////////
+    key <AB01> { [    period,   colon, periodcentered, dead_abovedot ] };
+    key <AB02> { [         q,          Q] };
+    key <AB03> { [         j,          J ] };
+    key <AB04> { [         k,          K] };
+    key <AB05> { [         x,          X] };
+    key <AB06> { [         b,          B] };
+    key <AB07> { [         m,          M] };
+    key <AB08> { [         w,          W,      lstroke,      Lstroke ] };
+    key <AB09> { [         v,          V] };
+    key <AB10> { [         z,          Z] };
+};
Update the symbols file
$ cd /usr/share/X11/xkb/symbols
$ sudo xkbcomp -lhlpR '*' -o ../symbols.dir
Logout and login. Presto!

Inga kommentarer:

Skicka en kommentar