Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5970419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:22:18+00:00 2026-05-22T20:22:18+00:00

Okay, I have been studying text input in SDL (how to turn the keystrokes

  • 0

Okay, I have been studying text input in SDL (how to turn the keystrokes data into letters and append them to a std::string called Text) and most of the tutorials have covered it this way:

//If a key was pressed
if(event->type == SDL_KEYDOWN )
{
        //If the key is a lowercase letter
        else if( (event->key.keysym.unicode >= (Uint16)'a' ) && (event->key.keysym.unicode <= (Uint16)'z' ) )
        {
            //Append the character
            Text += (char)event->key.keysym.unicode;
        }
}

However after some searching, I found a note in the SDL headers saying .unicode is deprecated and to use SDL_TextInputEvent/SDL_TextEditingEvent. There is some reference to it in the SDL documentation wiki, however I couldn’t find any example on how to use it. For instance, how would I write the above snippet using the new structure?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T20:22:19+00:00Added an answer on May 22, 2026 at 8:22 pm

    You might give this tutorial a try.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay so I have been trying to get into IoC lately. However, I keep
Okay, guys i have been trying to define a Stack , each node also
Okay. Now I give up. I have been playing with this for hours. I
Okay, I have just been through a massive amount of bull craparooonie with xcodes
Okay I been trying to work this out but unable too. I have a
Okay I have 2 files. One file is data that is updated every 10
Okay i have already been through most of the ati and nvidia guides to
Okay I am newer to python and have been researching this problem but I
Okay I have been working on a website but I keep on having an
Okay, I know this question have been asked plenty of times already, but I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.