Re: Key-press detection
- From: CBFalconer <cbfalconer@xxxxxxxxx>
- Date: Tue, 28 Aug 2007 17:35:17 -0400
David Sweeney wrote:
I am using C++ (with the Visual C++ compiler) on Windows XP, and
I am hoping to develop a simple computer game. I would like to
know if there is a way to detect which key the user is pressing,
eg, if the user is pressing 'a', can that be transferred into a
character? Can you write:
char c = GetKeyPress();
or something similar?
Not without using something non-standard and system-specific. Most
systems that handle keyboards have means of handling this, but it
can't be standard, because the keyboard may not exist.
--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>
--
Posted via a free Usenet account from http://www.teranews.com
.
- Follow-Ups:
- Re: Key-press detection
- From: Richard Heathfield
- Re: Key-press detection
- References:
- Key-press detection
- From: David Sweeney
- Key-press detection
- Prev by Date: Re: efficient comparison
- Next by Date: Re: Problem Debugging C Program
- Previous by thread: Re: Key-press detection
- Next by thread: Re: Key-press detection
- Index(es):
Relevant Pages
|