init
This commit is contained in:
17
examples/readkey_2
Normal file
17
examples/readkey_2
Normal file
@ -0,0 +1,17 @@
|
||||
#!/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
|
Reference in New Issue
Block a user