delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/08/03/18:34:17

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,SPF_HELO_PASS,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
X-IronPortListener: Outbound_SMTP
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av0EABFRHFCcKEcU/2dsb2JhbABFuTiBB4InEihRARUnAi8TFwEOAQQbGodrC5swhEacfJFsYAONFolIhGmKEIJ7
From: "Lavrentiev, Anton (NIH/NLM/NCBI) [C]" <lavr AT ncbi DOT nlm DOT nih DOT gov>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Date: Fri, 3 Aug 2012 18:33:34 -0400
Subject: kbhit() in a native app run from CYGWIN console does not work?
Message-ID: <A9D8BF3D8A74DF4A925FB541C0F39D2A16C25F1A59@NIHMLBX15.nih.gov>
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id q73MYDTw016300

Hi All,

I have a native Windows app that is run from bash (which is in turn run
in a standard Cygwin terminal window, mintty).  The application's code uses
kbhit() to check whether input is available from the user -- but it looks
like kbhit() never indicates any input (when keys are getting pressed).
The app works just fine if started directly from CMD.EXE.

Is that the expected behavior?

http://msdn.microsoft.com/en-US/library/58w7c94c%28v=vs.80%29

Thanks,

Anton Lavrentiev
Contractor NIH/NLM/NCBI


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


- Raw text -


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