Mail Archives: djgpp/2001/08/05/23:44:31
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 -