🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.c
Article #719

Re: Kody klawiszy i liter

#719
From: Yossarian
Date: Sun, 18 Jan 1998 13:39
37 lines
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
Technical Details
Message-ID: <34c2fc56.4313904@news.ict.pwr.wroc.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!news.icm.edu.pl!uw.edu.pl!ict.pwr.wroc.pl!not-for-mail
References: <34c12aaa.23872686@news.man.lublin.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!news.icm.edu.pl!uw.edu.pl!ict.pwr.wroc.pl!not-for-mail
From: ysr@kki.net.pl (Yossarian)
Newsgroups: pl.comp.lang.c
Subject: Re: Kody klawiszy i liter
Date: Sun, 18 Jan 1998 13:39:09 GMT
Organization: Technical University of Wroclaw, Poland
Lines: 37
Message-ID: <34c2fc56.4313904@news.ict.pwr.wroc.pl>
References: <34c12aaa.23872686@news.man.lublin.pl>
Reply-To: ysr@kki.net.pl
NNTP-Posting-Host: rap-cen214.opole.tpnet.pl
Mime-Version: 1.0
X-Newsreader: Forte Agent 1.5/32.452
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit