in reply to Arrow Keys
It all takes place in a terminal which has been set to raw device (?):while ( $_=getc(STDIN) ) { last if /[q\r\003\032]/;# break on q,Return,Ctrl-C,Ctrl-Z $Index-- if /[8A]/; # up $Index++ if /[2B]/; # down $Index=0 if /[9H1]/; # home $Index=$LineCount if /[3F4]/; # end }
$oldtty = `stty --save`; system('stty raw -echo');
| Regards... | Stefan |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Arrow Keys
by Anonymous Monk on May 27, 2009 at 18:28 UTC | |
by idbill (Initiate) on May 27, 2009 at 18:42 UTC | |
by idbill (Initiate) on May 27, 2009 at 20:45 UTC | |
by idbill (Initiate) on May 27, 2009 at 19:59 UTC |