[Top][All Lists]

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

Re: Don't understand input

From: Chris Seaton
Subject: Re: Don't understand input
Date: Sun, 30 Oct 2005 22:54:44 +0000

Thanks, but I'm still just as confused.

How do I tell an escape key (ASCII 27) from a control-[ (also 27)? How do I tell a backspace from a control-h? And so on...

Chris Seaton

On 29 Oct 2005, at 07:35, John Breen wrote:

At 12:47 29/10/2005, you wrote:

Hi Chris,

Using getch() function you will be able to get the key code. But it will be for only Ascii characters i.e. from 0 to 255. But complex key codes or lets say combination keys like as you say Ctrl +A, are double byte means you will need to call getch() twice to read actual key code. In first read it will give 0 (most probably) and in second getch() it will return another code. Give it a try.

Ummm... this is not strictly correct. Ctrl-@ (I think), Ctrl-A through Ctrl-Z and Ctrl-] are ASCII characters 0-27, they are only single byte characters, not "complex codes".


John Breen

Help-ncurses mailing list

reply via email to

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