Merge branch 'pu'
[jungerl.git] / lib / slang / demo / ex1.erl
bloba3e861a9cec6398451be66f93277901f93069c96
1 %%%----------------------------------------------------------------------
2 %%% File : ex1.erl
3 %%% Author : Claes Wikstrom <klacke@kaja.hemma.net>
4 %%% Purpose :
5 %%% Created : 22 Nov 2000 by Claes Wikstrom <klacke@kaja.hemma.net>
6 %%%----------------------------------------------------------------------
8 -module(ex1).
9 -author('klacke@kaja.hemma.net').
11 -compile(export_all).
13 run() ->
14 slang:init_tty(7,0,1),
15 slang:set_abort_signal(null),
16 loop().
18 loop() ->
19 io:format("Press any key to quit press ctl_G ",[]),
20 X = slang:getkey(),
21 io:format("Got key ~p~n", [X]),
22 case X of
23 7 ->
24 slang:reset_tty(),
25 halt(),
27 _ ->
28 loop()
29 end.