--- /dev/null
+Section "InputClass"
+ Identifier "CM Storm keyboard"
+ MatchIsKeyboard "on"
+ MatchDevicePath "/dev/input/event*"
+ Driver "evdev"
+ MatchUSBID "2516:0017"
+ Option "XkbOptions" "ctrlwin:swap_ctrl_win"
+EndSection
--- /dev/null
+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
--- /dev/null
+// 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 ] };
+};
--- /dev/null
+--- 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
--- /dev/null
+--- 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)