cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1999/08/11/07:31:27

Date: Mon, 9 Aug 1999 13:30:52 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: guthrie <guthrie AT nbnet DOT nb DOT ca>
cc: djgpp AT delorie DOT com
Subject: Re: kebaord input
In-Reply-To: <7olkks$ec0$1@garnet.nbnet.nb.ca>
Message-ID: <Pine.SUN.3.91.990809132718.26297C-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Mon, 9 Aug 1999, guthrie wrote:

> I know how to get input using getch() function...in the program i'm writing
> i want to be able to have the user to choose any of the keys to use ..and
> not just letter keys.

First, getch() can also read arrow keys and other non-ASCII keys: it 
returns zero, and you then need to call it again, to get the scan code.

An alternative is to use the function getxkey().  This one goes through 
the BIOS, and so recognizes more keys.  Its disadvantage is that BIOS 
doesn't know about national keyboards, so characters that are produced 
using the right ALT key need special translation tables.  The header 
<keys.h> includes symbolic definitions for all the scancodes of non-ASCII 
characters for use with getxkey().

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019