Keyboard input problem

Hi,
I’m getting a strange keyboard problem. when I get a keyboard even I
try to print out the unicode for it and always get 0. The code snipet
for the case statement is below.

case SDL_KEYDOWN:
scan = event.key.keysym.scancode;
cout << "Pressed(unicode): " << event.key.keysym.unicode << endl;
cout << “Pressed(unicode): [” << char(event.key.keysym.unicode) << “]”
<< endl;
enqueue_key(scan);
break;

No matter what key(s) I press I always get
Pressed(unicode): 0
Pressed(unicode): []

Any ideas why? Is there a way to get the ASCII code for the key you
pressed?–
Frank J. Ramsay
@Frank_Ramsay

The threadwin test program that comes with the latest (as of
last night) CVS snapshot has the same problem. Hitting any key
except ESC gives the following output.

Key ‘’ has been pressed
Key ‘’ has been releasedOn Sun, 26 Mar 2000, you wrote:

Hi,
I’m getting a strange keyboard problem. when I get a keyboard even I
try to print out the unicode for it and always get 0. The code snipet
for the case statement is below.

case SDL_KEYDOWN:
scan = event.key.keysym.scancode;
cout << "Pressed(unicode): " << event.key.keysym.unicode << endl;
cout << “Pressed(unicode): [” << char(event.key.keysym.unicode) << “]”
<< endl;
enqueue_key(scan);
break;

No matter what key(s) I press I always get
Pressed(unicode): 0
Pressed(unicode): []


-Nathan Smythe

“His eyes were cold. As cold as the bitter winter snow that was falling
outside. Yes, cold and therefore difficult to chew…”