Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SDL keys
#1
I am working in a console mode program to play chords (for a friend). I need multiple keys pressed at once. What do you suggest?

I know I can use SDL... Do I have to make the thing graphical? I want to stick to the console. If I can, how? What are other alternatives? Thanks Smile
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#2
Have you tried GetAsyncKeyState?
It will read multiple key presses... up to a point. I have held down a row and recieved about 5 seperate key returns at a single time.
ature has its way of warning a person away from danger: The distinct black and white coloration on a skunk, the chilling buzz of a rattlesanke, a redneck handing you his beer and saying "Watch this!"
Reply
#3
GetKeyState is generally better. I don't know why the original header didn't come with it, but it does now. Big Grin GetAsyncKeyState is useful for trapping keypresses when your application doesn't have the focus, so it has its uses, but if you want more control, then use GetKeyState instead.
I'd knock on wood, but my desk is particle board.
Reply
#4
Thanks, I'll look in an API reference for those.

Cheers.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)