Re: Key-press detection



On Aug 28, 11:35 am, "David Sweeney" <David.Sween...@xxxxxxxxxxxxxx>
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?

SDL (http://www.libsdl.org) provides some pretty easy facilities for
doing what you want, and may be helpful in developing the rest of your
game as well. As a bonus, it runs on many platforms, so your game will
be portable if you ever decide to take that route, make it more
advanced, etc.

.



Relevant Pages

  • Re: TECH: Williams Space Odyssey wont stop running
    ... coil was stuck when pressing the start button. ... start up and reset, but when pressing the button a second time to add ... After reviewing the start up sequence, I tracked it down to a switch ... If I trip the game over switch manually under the play field, ...
    (rec.games.pinball)
  • Re: TECH: Williams Space Odyssey wont stop running
    ... coil was stuck when pressing the start button. ... adjustment and the machine would reset every time the start button was ... If I trip the game over switch manually under the play field, ... advance to the second player since cleaning and adjust the switches. ...
    (rec.games.pinball)
  • TECH: Williams Space Odyssey wont stop running
    ... coil was stuck when pressing the start button. ... Adding a second player also worked properly. ... If I trip the game over switch manually under the play field, ... advance to the second player since cleaning and adjust the switches. ...
    (rec.games.pinball)
  • Re: TECH: Williams Space Odyssey wont stop running
    ... coil was stuck when pressing the start button. ... If I trip the game over switch manually under the play field, ... the game remains on even after turning off the power again. ...
    (rec.games.pinball)
  • Re: TECH: Williams Space Odyssey wont stop running
    ... coil was stuck when pressing the start button. ... If I trip the game over switch manually under the play field, ... the game remains on even after turning off the power again. ... advance to the second player since cleaning and adjust the switches. ...
    (rec.games.pinball)