Re: Addressing the cursor of a VT100 style terminal emulator using perl
- From: Thomas Dickey <dickey@xxxxxxxxxxxxxxxxxx>
- Date: Thu, 29 Dec 2005 13:10:16 -0000
Samwyse <samwyse@xxxxxxxxx> wrote:
>> don't see where that queries the current terminal size. Ditto for
>> Term::ANSIColor.
> Actually, when a terminal is resized, your app gets a SIGWINCH signal.
> You should then issue an ioctl to get the new size:
> struct winsize size;
> ioctl(fileno(stdout), TIOCGWINSZ, &size);
> This way, you don't have to query the terminal and worry about the user
> hitting a key at the wrong time. The ncurses library handles all of
> this for you, I suppose that Term::Cap does as well. The next time you
I don't belive Term::Cap does this since it doesn't have a getch() method.
(likewise Term::AnsiColor).
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
.
- Follow-Ups:
- References:
- Addressing the cursor of a VT100 style terminal emulator using perl
- From: Jeff Silverman
- Re: Addressing the cursor of a VT100 style terminal emulator using perl
- From: Samwyse
- Addressing the cursor of a VT100 style terminal emulator using perl
- Prev by Date: Re: Help Required using NET::TELNET Module ??
- Next by Date: Is any diffrence in...?
- Previous by thread: Re: Addressing the cursor of a VT100 style terminal emulator using perl
- Next by thread: Re: Addressing the cursor of a VT100 style terminal emulator using perl
- Index(es):