summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/tweaker/bin/twk_keymap.sh
diff options
context:
space:
mode:
authorBob Igo <bob@stormlogic.com>2009-01-17 17:53:44 (GMT)
committerBob Igo <bob@stormlogic.com>2009-01-17 17:53:44 (GMT)
commit18b8c17f24b9cd6d9600b212cbd615deb69fe500 (patch)
treece8b68a2277d4d81706c9f71832540a91361919e /abs/core-testing/tweaker/bin/twk_keymap.sh
parente2f581d7a980085e0078e01f1a38886ab88127ec (diff)
downloadlinhes_pkgbuild-18b8c17f24b9cd6d9600b212cbd615deb69fe500.zip
linhes_pkgbuild-18b8c17f24b9cd6d9600b212cbd615deb69fe500.tar.gz
linhes_pkgbuild-18b8c17f24b9cd6d9600b212cbd615deb69fe500.tar.bz2
Expanded Tweaker tar file into individual files, and adjusted installation process to reflect this. Further integration will be required before this is ready for R6.
Diffstat (limited to 'abs/core-testing/tweaker/bin/twk_keymap.sh')
-rwxr-xr-xabs/core-testing/tweaker/bin/twk_keymap.sh74
1 files changed, 74 insertions, 0 deletions
diff --git a/abs/core-testing/tweaker/bin/twk_keymap.sh b/abs/core-testing/tweaker/bin/twk_keymap.sh
new file mode 100755
index 0000000..41341bf
--- /dev/null
+++ b/abs/core-testing/tweaker/bin/twk_keymap.sh
@@ -0,0 +1,74 @@
+#!/bin/bash
+
+# Copyright 2007, 2008 Robert ("Bob") Igo of StormLogic, LLC and mythic.tv.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# This script is called from twk_general.pl to implement keymap standardization in KnoppMyth
+
+KNOPPMYTH_SHARE=/usr/local/share/knoppmyth
+
+####################
+# Unify key mappings
+####################
+
+# Universal keybindings:
+# Function Remote Key Keyboard Key
+# ------------------------------------------
+# Skip Back << PgUp
+# Skip Forward >> PgDn
+# Play |> l
+# Pause || p
+# Stop [] ESC
+
+#Make xine use keymappings that get along with mplayer, MythMusic, and ATI remote button mappings.
+#NOTE: "Prior" is PageUp and "Next" is PageDown
+if [[ -f $MYTH_HOME/.xine/keymap ]]; then
+ sed -i "/Mute {$/{N; s/key = .*/key = VOID/; }" $MYTH_HOME/.xine/keymap
+ sed -i "/MrlBrowser {$/{N; s/key = .*/key = VOID/; }" $MYTH_HOME/.xine/keymap
+ sed -i "/NextMrl {$/{N; s/key = .*/key = VOID/; }" $MYTH_HOME/.xine/keymap
+ sed -i "/PriorMrl {$/{N; s/key = .*/key = VOID/; }" $MYTH_HOME/.xine/keymap
+ sed -i "/AudioVideoDecay+ {$/{N; s/key = .*/key = VOID/; }" $MYTH_HOME/.xine/keymap
+ sed -i "/ToggleLoopMode {$/{N; s/key = .*/key = VOID/; }" $MYTH_HOME/.xine/keymap
+ sed -i "/PlaylistStop {$/{N; s/key = .*/key = VOID/; }" $MYTH_HOME/.xine/keymap
+ sed -i "/Mute {$/{N; N; s/modifier = .*/modifier = none/; }" $MYTH_HOME/.xine/keymap
+ sed -i "/Quit {$/{N; s/key = .*/key = Escape/; }" $MYTH_HOME/.xine/keymap
+ sed -i "/^Menu {$/{N; s/key = .*/key = m/; }" $MYTH_HOME/.xine/keymap
+ sed -i "/Play {$/{N; s/key = .*/key = l/; }" $MYTH_HOME/.xine/keymap
+ sed -i "/Pause {$/{N; s/key = .*/key = p/; }" $MYTH_HOME/.xine/keymap
+ sed -i "/SeekRelative+60 {$/{N; s/key = .*/key = Next/; }" $MYTH_HOME/.xine/keymap
+ sed -i "/SeekRelative-60 {$/{N; s/key = .*/key = Prior/; }" $MYTH_HOME/.xine/keymap
+ sed -i "/Volume+ {$/{N; s/key = .*/key = ]/; }" $MYTH_HOME/.xine/keymap
+ sed -i "/Volume- {$/{N; s/key = .*/key = [/; }" $MYTH_HOME/.xine/keymap
+else
+ mkdir -p $MYTH_HOME/.xine/
+ /bin/cp $KNOPPMYTH_SHARE/xine_keymap $MYTH_HOME/.xine/keymap
+fi
+chown -fR mythtv:mythtv $MYTH_HOME/.xine
+
+
+#Make mplayer use keymappings that get along with xine, MythMusic, and ATI remote button mappings.
+#NOTE: PGUP is PageUp and PGDWN is PageDown
+if [[ -f $MYTH_HOME/.mplayer/input.conf ]]; then
+ sed -i "s/^PGUP .*/PGUP seek -60/" $MYTH_HOME/.mplayer/input.conf
+ sed -i "s/^PGDWN .*/PGDWN seek +60/" $MYTH_HOME/.mplayer/input.conf
+ sed -i "s/^p .*/p pause/" $MYTH_HOME/.mplayer/input.conf
+ sed -i "s/^l .*/l pause/" $MYTH_HOME/.mplayer/input.conf
+else
+ mkdir -p $MYTH_HOME/.mplayer/
+ /bin/cp $KNOPPMYTH_SHARE/mplayer_keymap $MYTH_HOME/.mplayer/input.conf
+fi
+chown -fR mythtv:mythtv $MYTH_HOME/.mplayer
+
+echo "Tweaked keymap" \ No newline at end of file