delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/06/06/13:10:22

From: "0/0" <nsousbpoanmer AT naooslp DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: keyboard question
Date: 6 Jun 1999 04:06:16 GMT
Organization: Value Net Internetwork Services Inc.
Lines: 24
Message-ID: <01beafd1$bd6e4a20$fc4484ce@sub>
References: <VXj63.24$Et6 DOT 13292 AT newsgate DOT direct DOT ca> <01beafcf$4d264f80$fc4484ce AT sub>
NNTP-Posting-Host: fgna-252.value.net
X-Newsreader: Microsoft Internet News 4.70.1162
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I'm sorry I probably didn't make it clear, but call StartKeyboard at the
beginning of the program and StopKeyboard at the end, I am afraid what I
said earlier sounded like you should call those every time you check the
keyboard but that is not what I meant so just remember.

StartKeyboard();
//.....program initialization....

//program loop
while(!quit){
//check left arrow
    if(key[75]==1){
        //do `left arrow key' code here
    }
//....rest of code in loop....
}

//....program deinitialization.....
StopKeyboard();


something similar to this will do.

- Raw text -


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