tui.sh/examples/readkey_2
2023-03-21 02:48:44 +03:00

18 lines
325 B
Bash

#!/bin/sh
. ../tui.sh
printf 'Press arrow keys, q to quit.\n'
while true; do
tui_readkey KEY
case "$KEY" in
Up) printf 'Move UP\n';;
Down) printf 'Move DOWN\n';;
Left) printf 'Move LEFT\n';;
Right) printf 'Move RIGHT\n';;
q|Q) break;;
*) :
esac
done