getchar() {
trap "" SIGINT SIGQUIT
trap "return;" $SIG_DEAD
while true; do
read -s -n 1 key
case "$key" in
[qQ]) kill -$SIG_QUIT $game_pid
return
;;
[kK]) kill -$SIG_UP $game_pid
;;
[lL]) kill -$SIG_RIGHT $game_pid
;;
[jJ]) kill -$SIG_DOWN $game_pid
;;
[hH]) kill -$SIG_LEFT $game_pid
;;
esac
done
}
I have this part of a code and the values in []
are for moving wright, left, up and down. I would like to replace it with the arrrows on the keyboard, but i don´t know what value to put in.