www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/05/06/09:30:13

Date: Fri, 6 May 1994 08:59:20 -0400 (EDT)
From: Edwin Phillips <flaregun AT strauss DOT udel DOT edu>
Subject: Re: How do you detect CTRL-CURSOR KEY???
To: DJGPP mailing list <djgpp AT sun DOT soe DOT clarkson DOT edu>

On Thu, 5 May 1994 wozzle!alane AT imageek DOT york DOT cuny DOT edu wrote:

> 
> > > 	I am trying to detect when the user presses CTRL and a cursor key.
> > > 	I can detect a cursor key on its own but I don't know how to detect 
> > > the combination of CTRL and a cursor key.
> > 
> > When the key comes, in, use dosmemget to look at the BIOS key flags,
> > which tell you the state of all the shift/ctrl/alt/etc keys.
> 
> Uh, DJ, did you forget that the system buffers keys? :) You can't be sure
> the BIOS flags at the time you read the key are the ones in effect when it
> was typed.
> 
> The BIOS returns scan codes 115 and 116 for control-left and
> control-right. It doesn't recognize the others, though. Sounds like
> it's time for a custom interrupt 9 handler, unfortunately.
> 

  The mouse routines from GRX return the status of ctrl/shift/alt/... along 
with the keypress.  I've never used them for the keypad, but you might 
give it a try.  It's really easy to use.

  Ed

/***************************************************************************/
/* Ed Phillips  flaregun AT strauss DOT udel DOT edu      University of Delaware      */
/* Jr Systems Programmer  (302) 831-6082       NSS/Software Systems        */
/***************************************************************************/


- Raw text -


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