bug-ncurses
[Top][All Lists]
Advanced

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

Re: alt key


From: Bob Rossi
Subject: Re: alt key
Date: Thu, 7 Dec 2006 11:52:33 -0500
User-agent: Mutt/1.5.12-2006-07-14

On Thu, Dec 07, 2006 at 11:29:55AM -0500, Pierre Abbat wrote:
> Bob Rossi wrote:
> >Hi,
> >
> >How does ncurses handle reading alt combinations from the keyboard?
> >If the uesr types 'Alt-e', what does ncurses get from the terminal? Is
> >this described in the terminfo database?
> 
> I've typed alt-keys in various keyboard layouts. Alt plus a letter 
> (whether it's Latin, Cyrillic, or whatever) turns into escape plus the 
> letter, but IIRR alt plus a function key has its own code. I wrote a 
> routine which turns escape+letter into one code.

That's what I thought. This used to be the case for me as well. However,
now when I run, it's not. Look at the example program. When I hit Alt-e,
I expect, the escape key, followed bye e. However, I get,

Alt-e gives,
195
165
Alt-f gives,
195
166
Alt-g gives,
195
167

I can see a pattern, but wonder why it's printing this way.

Thanks,
Bob Rossi

Attachment: main.c
Description: Text Data


reply via email to

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