]> oss.titaniummirror.com Git - dispcfg.git/commitdiff
Remove setctrl
authorR. Steve McKown <rsmckown@gmail.com>
Sat, 31 Jan 2015 04:15:47 +0000 (21:15 -0700)
committerR. Steve McKown <rsmckown@gmail.com>
Sat, 31 Jan 2015 04:15:47 +0000 (21:15 -0700)
No longer need setctrl.  New xkb option added to swap windows and
control keys, which is added to the external keyboard via
/usr/share/xorg.conf.d file.  This in the cmstorm repository.

dispcfg
setctrl [deleted file]

diff --git a/dispcfg b/dispcfg
index f0cc4a275d1f22c87be69af65992ce530ad19369..9c996112f2260c5a36e96aa89a509ece5b621bbb 100755 (executable)
--- a/dispcfg
+++ b/dispcfg
@@ -231,10 +231,6 @@ if __name__ == '__main__':
                 enabled_count -= disable_an_entry(outputs)
             enabled_count += enable_an_entry(outputs, enabled_count < 2)
 
-        # A hack to set Control/Win key mapping
-        if not dry_run:
-            subprocess.call('/usr/local/bin/setctrl')
-
         out.outTime('completed')
         out.fout('')
 
diff --git a/setctrl b/setctrl
deleted file mode 100755 (executable)
index 77d5ae3..0000000
--- a/setctrl
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/bash
-# Set the Control/Win key swap state.  This is a hack of a script.
-# If the CM Storm keyboard is present, swap Control and Win (Super) keys.  If
-# this keyboard is not present, unswap.  Steve's CM Storm keyboard has had its
-# Control and Win keycaps swapped, as the proper Control key locations are, on
-# this keyboard, where the Windows keys are by default.
-
-swapctrl()
-{
-xmodmap -e "clear Control"
-xmodmap -e "clear Mod4"
-xmodmap -e "keycode 133 = Control_L NoSymbol Control_L"
-xmodmap -e "keycode  37 = Super_L NoSymbol Super_L"
-xmodmap -e "keycode 134 = Control_R NoSymbol Control_R"
-xmodmap -e "keycode 105 = Super_R NoSymbol Super_R"
-xmodmap -e "keycode 206 ="
-xmodmap -e "add Control = Control_L Control_R"
-xmodmap -e "add Mod4 = Super_L Super_R"
-}
-
-unswapctrl()
-{
-xmodmap -e "clear Control"
-xmodmap -e "clear Mod4"
-xmodmap -e "keycode  37 = Control_L NoSymbol Control_L"
-xmodmap -e "keycode 133 = Super_L NoSymbol Super_L"
-xmodmap -e "keycode 206 = NoSymbol Super_L NoSymbol Super_L"
-xmodmap -e "keycode 105 = Control_R NoSymbol Control_R"
-xmodmap -e "keycode 134 = Super_R NoSymbol Super_R"
-xmodmap -e "add Control = Control_L Control_R"
-xmodmap -e "add Mod4 = Super_L Super_R"
-}
-
-
-if xinput --list --name-only | grep -q "CM Storm"; then
-    echo 'Swapping Control and Windows/Super keys'
-    swapctrl
-else
-    echo 'Restoring Control and Windows/Super keys'
-    unswapctrl
-fi
-exit 0