bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FW: possible bug


From: Olson, Mike
Subject: FW: possible bug
Date: Fri, 20 Feb 2009 10:46:35 -0500


Michael Olson| Developer | Idea Integration | (904) 360-2129 | Fax (904) 
360-2490 | www.idea.com | (NYSE: MPS)
Idea Integration, A MPS Group Company - IT solutions from the desktop to the 
data center.



-----Original Message-----
From: Olson, Mike 
Sent: Friday, February 20, 2009 9:57 AM
To: 'address@hidden'
Subject: RE: possible bug

I guess my main issue is why I can take the same program over to a dec-alpha 
unix box and I get the same escape sequence both times.
Why is this working differently on Linux?  My program is reading a character 
via getch().  Shouldn't that be resuming the keypad mode?

Thanks,

Michael Olson| Developer | Idea Integration | (904) 360-2129 | Fax (904) 
360-2490 | www.idea.com | (NYSE: MPS)
Idea Integration, A MPS Group Company - IT solutions from the desktop to the 
data center.


-----Original Message-----
From: Thomas Dickey [mailto:address@hidden 
Sent: Thursday, February 19, 2009 8:00 PM
To: Olson, Mike
Cc: address@hidden
Subject: Re: possible bug

> Before we exit curses mode the key sequence that we display for the 
> right arrow key is \EOC, after endwin and refresh is called what gets 
> displayed for the same key is \E[C.

It's obscure, but debatable whether it's a bug.

ncurses turns the terminal keypad mode off in endwin, but doesn't resume the 
keypad mode until it prepares to read a character via wgetch.

That's done (implicitly) to make initialization a little more efficient (escape 
sequences are written as needed).

There's no direct way to force that to be reset, other than by using the 
private function _nc_keypad (whose interface does change over time...).

If you're not insistent that it's using select() followed by read(), you could 
do

        nodelay(stdscr, TRUE);

and read the data via getch().

--
Thomas E. Dickey <address@hidden> http://invisible-island.net 
ftp://invisible-island.net

Confidentiality Notice: The material in this e-mail is intended only for the 
use of the individual to whom it is addressed and may contain information that 
is confidential, privileged, and exempt from disclosure under applicable law. 
If you are not the intended recipient, be advised that the unauthorized use, 
disclosure, copying, distribution, or the taking of any action in reliance on 
this information is strictly prohibited. If you have received this e-mail in 
error, please immediately notify us at 866-335-3289 to arrange for the return 
of this material to us. Thank You.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]