delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/12/27/08:20:06

From: "Martin Blasczyk" <byk AT eikon DOT tum DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Redirectable Keyboardinput
Date: Sun, 27 Dec 1998 14:15:20 +0100
Organization: [posted via] Leibniz-Rechenzentrum, Muenchen (Germany)
Lines: 19
Distribution: world
Message-ID: <765bu5$3k3$1@sparcserver.lrz-muenchen.de>
NNTP-Posting-Host: dialc012.ppp.lrz-muenchen.de
X-Newsreader: Microsoft Outlook Express 4.72.3110.1
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi!

I want to check if a key is pressed and if so, read it. I tried:

if (kbhit()!=0) c=getkey();

It works, but it isn't redirectable. If I for example do a 'ctty com1' the
routine wants the key to be pressed on the keyboard, not on the terminal
conected to com1. Could You give me a hint?

Thanks in advance.

Regards,

Martin Blasczyk

P.S.: Djgpp is really great!


- Raw text -


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