New to SDL - text input question

Hi, I’m new to SDL.

I’m working on porting a mixed text and graphics application from an old and
unsupported graphics library (jlib) and am currently looking to use SDL.

I’m slowly getting the hang of things and will probably be using SDL_ttf to
do the text mode part of the app.

I’m currently looking at the keyboard input side of things. I started
writing some event handler code for key-up/down etc and realised that this
had probably been done before.

So, is there any keyboard handling code for SDL? Stuff that sorts out shift
state etc? Or maybe a way to have stdin (or another file handle) receive the
key presses for the SDL generated window?

Platform is Debian Linux and language is c.

regards,

Colin–
Colin Tuckley | @Colin_Tuckley | PGP/GnuPG Key Id
+44(0)1903 236872 | +44(0)7799 143369 | 0x1B3045CE

Common Sense is the collection of prejudices acquired by age eighteen. - A.
Einstein

This is in C++, but it might be useful:

http://lazyfooproductions.com/SDL_tutorials/lesson25/index.php

-bill!
bill at newbreedsoftware.com
http://www.newbreedsoftware.com/On Fri, Dec 01, 2006 at 05:45:57PM +0000, Colin Tuckley wrote:

So, is there any keyboard handling code for SDL? Stuff that sorts out shift
state etc? Or maybe a way to have stdin (or another file handle) receive the
key presses for the SDL generated window?

Platform is Debian Linux and language is c.

Bill Kendrick wrote:

This is in C++, but it might be useful:

http://lazyfooproductions.com/SDL_tutorials/lesson25/index.php

Thanks! that showed me that if you use UNICODE then most of the translation
is done for you, which makes the rest of it manageable.

regards,

Colin–
Colin Tuckley | @Colin_Tuckley | PGP/GnuPG Key Id
+44(0)1903 236872 | +44(0)7799 143369 | 0x1B3045CE

Try to learn from other people’s mistakes, you haven’t time to make them all
yourself! - Anon