#!/bin/bash

key=$1
mod=$2

echo key=$key

case "$key" in
	0x6a)	
#				echo back
		exec musicrew $mod
	;;
	0x69)	
#				echo forw
		exec musicfwd $mod
	;;
	0x68)	
#				echo stop
		exec musicpause $mod
	;;
	0x6c)	
#				echo mail
		exec xterm -rv -e ssh -t -l tcon suphys "pine"
	;;
	0x66)	
#				echo favourites
				if [ $mod = 0 ] ; then
					exec xemacs -f desktop-read
				elif [ $mod = 1 ] ; then
					exec 4xtermremote tcon@hera tcon@hera tcon@hera tcon@hera
                                else
                                        exec 4xtermremote localhost localhost localhost localhost 
				fi
	;;
	0x32)	
#				echo home
		exec mozilla
	;;
	0x6b)	
#				echo mycomp
		exec xterm -rv -ls
	;;
	0x21)	
#				echo calc
		exec xcalc
	;;
	0x5f)   
#				echo sleep
		exec apmdown
	;;
esac
