]> oss.titaniummirror.com Git - cmstorm.git/commitdiff
Initial commit master
authorR. Steve McKown <rsmckown@gmail.com>
Sat, 31 Jan 2015 04:27:19 +0000 (21:27 -0700)
committerR. Steve McKown <rsmckown@gmail.com>
Sat, 31 Jan 2015 04:27:19 +0000 (21:27 -0700)
90-evdev-CM-Storm.conf [new file with mode: 0644]
README [new file with mode: 0644]
ctrlwin [new file with mode: 0644]
evdev.lst.patch [new file with mode: 0644]
evdev.patch [new file with mode: 0644]

diff --git a/90-evdev-CM-Storm.conf b/90-evdev-CM-Storm.conf
new file mode 100644 (file)
index 0000000..c1b29e0
--- /dev/null
@@ -0,0 +1,8 @@
+Section "InputClass"
+       Identifier "CM Storm keyboard"
+       MatchIsKeyboard "on"
+       MatchDevicePath "/dev/input/event*"
+       Driver "evdev"
+       MatchUSBID "2516:0017"
+       Option "XkbOptions" "ctrlwin:swap_ctrl_win"
+EndSection
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..4a1862b
--- /dev/null
+++ b/README
@@ -0,0 +1,18 @@
+Provide a configuration for an external USB CM Storm keyboard that swaps the
+Windows and Control keys automatically when the device is connected.
+
+Steps to install:
+
+1. sudo cp ctrlwin /usr/share/X11/xkb/symbols/
+   sudo chmod 644  /usr/share/X11/xkb/symbols/ctrlwin
+
+2. sudo cp 90-evdev-CM-Storm.conf /usr/share/X11/xorg.conf.d/
+   sudo chmod 644 /usr/share/X11/xorg.conf.d/90-evdev-CM-Storm.conf
+
+3. sudo -s
+   cd /usr/share/X11/xkb/rules
+   patch -p0 < evdev.patch
+   patch -p0 < evdev.lst.patch
+
+4. Logout and back in so Xorg will re-read the config files in
+   /usr/share/X11/xorg.conf.d
diff --git a/ctrlwin b/ctrlwin
new file mode 100644 (file)
index 0000000..b3467b6
--- /dev/null
+++ b/ctrlwin
@@ -0,0 +1,8 @@
+// Swap the Ctrl and Win keys.
+partial modifier_keys
+xkb_symbols "swap_ctrl_win" {
+    key <LWIN> { [ Control_L ] };
+    key <LCTL> { [ Super_L ] };
+    key <RWIN> { [ Control_R ] };
+    key <RCTL> { [ Super_R ] };
+};
diff --git a/evdev.lst.patch b/evdev.lst.patch
new file mode 100644 (file)
index 0000000..4d9bb9b
--- /dev/null
@@ -0,0 +1,11 @@
+--- evdev.lst.orig     2014-01-15 07:42:33.000000000 -0700
++++ evdev.lst  2015-01-30 20:20:20.976390083 -0700
+@@ -800,6 +800,8 @@
+   altwin:hyper_win     Hyper is mapped to Win-keys
+   altwin:alt_super_win Alt is mapped to Right Win, Super to Menu
+   altwin:swap_alt_win  Alt is swapped with Win
++  ctrlwin              Ctrl/Win key behavior
++  ctrlwin:swap_ctrl_win Ctrl and Win keys are swapped
+   Compose key          Position of Compose key
+   compose:ralt         Right Alt
+   compose:lwin         Left Win
diff --git a/evdev.patch b/evdev.patch
new file mode 100644 (file)
index 0000000..92f8ee0
--- /dev/null
@@ -0,0 +1,10 @@
+--- evdev.orig 2014-01-15 07:42:33.000000000 -0700
++++ evdev      2015-01-30 20:20:08.708389769 -0700
+@@ -971,6 +971,7 @@
+   altwin:hyper_win    =       +altwin(hyper_win)
+   altwin:alt_super_win        =       +altwin(alt_super_win)
+   altwin:swap_alt_win =       +altwin(swap_alt_win)
++  ctrlwin:swap_ctrl_win       =       +ctrlwin(swap_ctrl_win)
+   grp:switch          =       +group(switch)
+   grp:lswitch         =       +group(lswitch)
+   grp:win_switch      =       +group(win_switch)