Thread View: pl.comp.lang.c
2 messages
2 total messages
Started by Marcin Steciak
Sat, 17 Jan 1998 22:06
Kody klawiszy i liter
Author: Marcin Steciak
Date: Sat, 17 Jan 1998 22:06
Date: Sat, 17 Jan 1998 22:06
8 lines
678 bytes
678 bytes
Jak je odrozniac od siebie, np:
z=getch();
if (z==75)printf("aha!!!");
zadaziala gdy wprowadze litere K a takze gdy nacisne klawisz <-.
Pozdrawiam
Marcin Steciak
Re: Kody klawiszy i liter
Author: Yossarian
Date: Sun, 18 Jan 1998 13:39
Date: Sun, 18 Jan 1998 13:39
37 lines
1422 bytes
1422 bytes
Dokladnie Sat, 17 Jan 1998 22:06:38 GMT, steciako@friko.onet.pl
(Marcin Steciak) napisal(a):
>Jak je odrozniac od siebie, np:
>z=getch();
>if (z==75)printf("aha!!!");
>
>zadaziala gdy wprowadze litere K a takze gdy nacisne klawisz <-.
niezupelnie
z=getch();
if (z==75)printf("aha!!!");
zadziala tylko dla K
wzsytkie Fx, kursory, PgUp itp. zwracaja najpierw zero, a potem
wlasciwy kod
najlpeiej zrobic rozszerzone getch()
unsigned egetch()
{
int r=getch();
if (!r) return getch()<<8;
return r;
}
teraz K zwroci 0x004B, a <- zwroci 0x4B00
Jarek Woloszyn
x-------------------------------------x
| ysr@kki.net.pl |
| http://free.polbox.pl/w/woljar |
| UIN: 1922941 |
x-------------------------------------x
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads