Jump to content
  • Advertisement
Sign in to follow this  
ishkabible

SDL Keyborad input handling

This topic is 3169 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i was wondering if there was a way to call every frame on something that would return 1 or 0 as to weather or not a key was down. the reason i want this is mostly because I'm more used to Flash. i have grown to like SDL more though. an exaple would be
 
//im sudo coding as to how i think it should work
if( SDLK_x.isDown == true) {
  // then do what ever the hell you want
}

Share this post


Link to post
Share on other sites
Advertisement
Quote:
i was wondering if there was a way to call every frame on something that would return 1 or 0 as to weather or not a key was down.
SDL_GetKeyState().
Quote:
im sudo coding
Lol...someone's been spending too much time at the *nix command line ;)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!