Jump to content
  • Advertisement
Sign in to follow this  
Acharis

Key repeat

This topic is 2307 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

How can I make key repeat (like in Notepad)? I need only one key at once (no simultaneous key presses, except SHIFT of course to detect capital letters), standard latin charset only (ASCII + cursors + delete + backspace), no UTF8 or other extravagances.


If possible, I would love these additional features (but can live without them):
- it does not interfere with standard key press (can use key repeat version for edit fields and standard behaving SDL keys for movin a ship for example)
- automatic conversion of small letters to capitals letters if any SHIFT or CAPS LOCK pressed
- national characters handling (only latin like 8 bit charsets)
Again, these are extras, only if possible, above all I need a functional basic version as desribed in the first sentence.

Share this post


Link to post
Share on other sites
Advertisement
You can use SDL_EnableKeyRepeat() to enable key repeat and SDL_EnableUNICODE() to get character codes that correspond to key events.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!