delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/08/05/23:44:31

From: "Kees Advokaat" <k DOT advokaat AT hccnet DOT nl>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: arrowkeys keyboard
Date: Mon, 6 Aug 2001 05:05:32 +0200
Organization: Hobby Computer Club News Network
Lines: 67
Sender: k DOT advokaat AT hccnet DOT nl@fia61-30.dsl.hccnet.nl
Message-ID: <9kl1af$ik3$1@news.hccnet.nl>
References: <9jvmbi$1m3$1 AT news DOT hccnet DOT nl> <N8_87.292780$XL1 DOT 5156001 AT nlnews00 DOT chello DOT com>
NNTP-Posting-Host: fia61-30.dsl.hccnet.nl
X-Trace: news.hccnet.nl 997066895 19075 62.251.30.61 (6 Aug 2001 03:01:35 GMT)
X-Complaints-To: abuse AT hccnet DOT nl
NNTP-Posting-Date: 6 Aug 2001 03:01:35 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Thanks a lot Eli and Wim.

Good luck.

Kees
"Wim Cools" <w DOT cools AT chello DOT nl> schreef in bericht
news:N8_87.292780$XL1 DOT 5156001 AT nlnews00 DOT chello DOT com...
>
> "Kees Advokaat" <k DOT advokaat AT hccnet DOT nl> schreef in bericht
> news:9jvmbi$1m3$1 AT news DOT hccnet DOT nl...
> > Hallo,
> >
> > Can anybody tell me, what is the nature of the four arrowkeys of
the
> > qwerty keyboard?
> > I mean, is there an ascii-value underneath that I can use in a
char
> > variable? What value?
>
> Extended ASCII keys like the arrowkeys first return a '0' and then
an ASCII
> value.
> For example, when you press the "UP"-arrow, the first getch() will
return 0,
> and doing another one will return an 'H'
>
> int main()
> {
>         char c;
>         c = getch();
>         if (c == 0)
>         {
>                 c = getch();
>                 if (c == 'H') printf("up!\n");
>         } else printf(" %c\n", c);
>         getch();
> }
>
> I'll put a little list here of the most common keys:
> Key    Returns
> home G
> end    O
> up      H
> down  P
> left K
> right M
> pageup I
> pagedown Q
> insert R
> delete S
> F1 ;
> F2 <
> F3 =
> F4 >
> F5 ?
> F6 @
> F7 A
> F8 B
> F9 C
> F10 D
>
> Hope this helps,
> Wim.
>
>


- Raw text -


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