delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/04/16/11:56:51

Message-ID: <422D62CDE87D144687C60CEC7419AD42048A64@sgkms01.uk.perrymail.com>
From: "Ellingworth, Richard" <Richard DOT Ellingworth AT uk DOT perrymail DOT com>
To: "'djgpp AT delorie DOT com'" <djgpp AT delorie DOT com>
Subject: F11 and F12 keys and conio problems.
Date: Wed, 16 Apr 2003 16:55:50 +0100
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Reply-To: djgpp AT delorie DOT com

Hello. Can anyone enlighten me as to what is going on here? It runs OK, but
when I press F11 or F12 the program pauses. It can be restarted by pressing
another key. How do I get rid of this behaviour because I want to use F11
and F12 for something else?

I am running in a DOS box under Windows 98. The same behaviour has been seen
on another program running under Datalight DOS. More than likely the same
thing happens under MSDOS 6.22 but I have not tested this.


#include <stdio.h>
#include <conio.h>

int main( void )
{
	bool quit = false;
	int key;

	while( ! quit ) {

		putch( '*' );

		if( kbhit() ) {

			key = getch();

			if( key ) {
				quit = ( key == 27 );		// escape
key
			}
			else {
				key = getch();
			}

		}

	}

	return 0;
}

Richard Ellingworth, Senior Software Engineer, Perry Slingsby Systems
Limited
NOTE : My e-mail address has recently changed. It is now
richard DOT ellingworth AT uk DOT perrymail DOT com
Please visit our web site at http://www.perryslingsbysystems.com

Whereas every effort has been made to ensure that the information given
herein is accurate Perry Slingsby Systems Limited accepts no responsibility
for any errors, omissions or misleading statements in that information and
no responsibility is accepted as to the standing of any firm, company or
individual mentioned. This message contains information intended only for
the use of the addressee named above. It may also be confidential and/or
privileged. If you are not the intended recipient of this message you are
hereby notified that you must not disseminate, copy or take any action in
reliance on it. If you have received this message in error please notify the
sender. 

Perry Slingsby Systems Ltd, Ings Lane, Kirkbymoorside, York, YO62 6EZ

Registered Office: 262 High Holborn, London, WC1V 7NA

Registered in England No. 1401160

- Raw text -


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