in reply to Re: how to check for keyboard input
in thread how to check for keyboard input
Warning: you need to set the readmode back to normal before exiting. So don't just exit on 'q' - do something to get the terminal back into its regular state.
sub safe_exit { ReadMode('normal'); exit(@_); } # ... safe_exit if $key eq 'q'; # ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: how to check for keyboard input
by chb (Deacon) on Jul 21, 2005 at 08:07 UTC | |
by benizi (Hermit) on Jul 21, 2005 at 17:17 UTC |