🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #7748

Re: Reading the arrow keys... how?

#7748
From: Chris Huey
Date: Mon, 25 Jan 1993 19:12
22 lines
1702 bytes
D'Arcy J.M. Cain (darcy@druid.uucp) wrote:
: rnichols@cbnewsg.cb.att.com (robert.k.nichols) writes:
: >In article <1jmeupINN4g9@savoy.cc.williams.edu> 93gke@williams.edu (Just Ask The Axis) writes:
: >>I am trying to read the arrow keys from a PC keyboard in C. So far
: >You can use getch() to read the arrow keys.  The extended keys all
: >return a 2-byte sequence, with the first byte being either 0 or 0xE0.
: 
: Where did you get that 0xE0?  It returns a zero byte followed by the
: scan code.
: 
The E0 (as the Norton guide will tell you) comes directly from the keyboard
and is read by INT 9.  It is sent by the extended keys on 101 (and greater)
key keyboards.  Ie: the cursor movement, home, end, insert, delete keys,
etc. all prefix their scan codes with an E0.  Note that the numeric island
keys do not prefix with an E0.  They just send the scan code - as you were
describing.  Naturally, the 84 key keyboard knows nothing about E0 codes.

-- 
Chris Huey                                               Motorola Computer Group
cah@pdx.csd.mot.com                                      Voice: (503) 520-5215
 "I lost my job last month.  Actually, I didn't really lose it.  I know right
 where it is.  There's just some other guy doing it now." -- Steven Wright
Technical Details
Message-ID: <1447@pdxvme.pdx.csd.mot.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!uwm.edu!linac!att!mcdchg!mcdphx!mcspdx!cah
References: <1993Jan23.193041.19858@druid.uucp>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!uwm.edu!linac!att!mcdchg!mcdphx!mcspdx!cah
From: cah@pdx.csd.mot.com (Chris Huey)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Reading the arrow keys... how?
Message-ID: <1447@pdxvme.pdx.csd.mot.com>
Date: 25 Jan 93 19:12:28 GMT
References: <1993Jan23.193041.19858@druid.uucp>
Organization: Motorola, Beaverton, OR
Lines: 22
X-Newsreader: TIN [version 1.1 PL6]