]> code.delx.au - dotfiles/commitdiff
added keyboard tools
authorJames Bunton <jamesbunton@delx.net.au>
Tue, 4 Nov 2014 03:11:18 +0000 (14:11 +1100)
committerJames Bunton <jamesbunton@delx.net.au>
Tue, 4 Nov 2014 03:11:47 +0000 (14:11 +1100)
bin/keyboard-apple-off [new file with mode: 0755]
bin/keyboard-apple-on [new file with mode: 0755]
bin/keyboard-keymap-reload [new file with mode: 0755]

diff --git a/bin/keyboard-apple-off b/bin/keyboard-apple-off
new file mode 100755 (executable)
index 0000000..995043c
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+xmodmap /dev/stdin <<EOT
+clear mod1
+clear mod4
+keycode 64 = Alt_L
+keycode 108 = Alt_R
+keycode 133 = Super_L
+keycode 134 = Super_R
+add mod1 = Alt_L Alt_R
+add mod4 = Super_L Super_R
+EOT
+
diff --git a/bin/keyboard-apple-on b/bin/keyboard-apple-on
new file mode 100755 (executable)
index 0000000..19e2d35
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+xmodmap /dev/stdin <<EOT
+clear mod1
+clear mod4
+keycode 133 = Alt_L
+keycode 134 = Alt_R
+keycode 64 = Super_L
+keycode 108 = Super_R
+add mod1 = Alt_L Alt_R
+add mod4 = Super_L Super_R
+EOT
+
diff --git a/bin/keyboard-keymap-reload b/bin/keyboard-keymap-reload
new file mode 100755 (executable)
index 0000000..c957dbd
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+setxkbmap `cat ~/.Xkbmap`