[Top][All Lists]

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

Re: X and ncurses / getch() and X-keyevents

From: Thomas Dickey
Subject: Re: X and ncurses / getch() and X-keyevents
Date: Sat, 15 Feb 2003 14:42:45 -0500
User-agent: Mutt/1.3.27i

On Sat, Feb 15, 2003 at 07:58:33PM +0100, Thomas Zauner wrote:
> hello,
> i use ncurses within an xterm.
> there are some thing i dont understand.
> all given code is pseudo-c. it should be obvious what is meant.
> 1) when resizing the xterm i get a keycode 410 returned from getch()
> is that the "official" way to handl window resizes?

yes - that's

#define KEY_RESIZE      0632            /* Terminal resize event */

There are some examples in the test directory which use this.

> 2) i use sth. like the following to handle events. 
> most of the time it works fine but sometimes the getch() dosen't get the 
> right key or a key at all when i press it. 
> i think its the combination of the X event loop and the getch() function but 
> i cant figure out why it's "wrong" or "poor" code. 
> OK here we go
> --------------------------------------------------------------------------- 

what window are you getting the X events from?  (that's probably not the
problem, but I'm curious).  More likely the problem is interfering select
calls in ncurses and the X library.

Thomas E. Dickey <address@hidden>

reply via email to

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