| Term-Completion documentation | view source | Contained in the Term-Completion distribution. |
Term::Completion::_readkey - utility package for Term::Completion using Term::ReadKey
This utility package contains few methods that are required for Term::Completion to put the terminal in "raw" mode and back. This package uses Term::ReadKey to accomplish this, which should be portable across many systems.
Uses Term::ReadKey's ReadMode 4 to set the terminal into
"raw" mode, i.e. switch off the meaning of any control characters like
CRTL-C etc. Also the echo of characters is switched off, so that the
program has full control of what is typed and displayed.
Uses the "in" field of the Term::Completion object to get the input file handle.
Resets the terminal to its previous state, using ReadMode 0.
Reads one byte from the input handle. Uses ReadKey.
Determine the terminal size with GetTerminalSize and
return the list of columns and rows (two integers).
Marek Rouchal <marekr@cpan.org>
Copyright (c) 2009, Marek Rouchal. All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.
| Term-Completion documentation | view source | Contained in the Term-Completion distribution. |