Hi
Is there any way by which I can get to know the corresponding character when a
key is pressed?
for e.g
I press the alphabet q : can I get this information from the sdl key?
Hi
Is there any way by which I can get to know the corresponding character when a
key is pressed?
for e.g
I press the alphabet q : can I get this information from the sdl key?
Best advice: Check the documentation.
At least in my system the top level document is found at /[wherever you unpacked it]/SDL-1.2.13/docs/html/index.html
More specifically you have the keyboard explained in chapter I-3: Input handling / Handling the keyboard.
There you can see how the SDL_keysym structure is built, and how to figure out which key was pressed.
Cheers
/ Daniel> To: sdl at libsdl.org
From: jytgyl at gmail.com
Date: Wed, 10 Jun 2009 06:49:23 +0000
Subject: [SDL] sdl key queryHi
Is there any way by which I can get to know the corresponding character when a
key is pressed?
for e.g
I press the alphabet q : can I get this information from the sdl key?
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Vi vet vem du passar ihop med! Klicka h?r f?r att f? veta!
http://dejting.se.msn.com/channel/index.aspx?trackingid=1002952
If you need specific help, check these links. What you want is the event
SDL_KEYDOWN and then check the sym (something like event.key.keysym.sym).
The key itself is a constant define; i.e., SDLK_q. If you’re curious, there
is no capital SDLK_Q, only key modifiers (that tell you shift is down, caps
is on, alt is pressed, etc.).
http://lazyfoo.net/SDL_tutorials/lesson08/index.php
http://www.sdltutorials.com/sdl-events/
It sounds like you’re very new to SDL, so, I’d check the tutorials if the
documentation confuses you.
http://www.libsdl.org/intro.en/usingevents.html
Tim Jones
www.sdltutorials.comOn Wed, Jun 10, 2009 at 3:14 AM, Daniel Johansson <vild.vacker at hotmail.com>wrote:
Best advice: Check the documentation.
At least in my system the top level document is found at /[wherever you
unpacked it]/SDL-1.2.13/docs/html/index.htmlMore specifically you have the keyboard explained in chapter I-3: Input
handling / Handling the keyboard.There you can see how the SDL_keysym structure is built, and how to figure
out which key was pressed.Cheers
/ DanielTo: sdl at libsdl.org
From: jytgyl at gmail.com
Date: Wed, 10 Jun 2009 06:49:23 +0000
Subject: [SDL] sdl key queryHi
Is there any way by which I can get to know the corresponding character
when a
key is pressed?
for e.g
I press the alphabet q : can I get this information from the sdl key?
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Hitta k?rleken lagom till sommaren! Klicka h?r MSN Dejtinghttp://dejting.se.msn.com/channel/index.aspx?trackingid=1002952
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Also look for SDL_EnableUNICODE() and the corresponding part of the
SDL_Event struct (event.key.keysym.unicode). This is useful for
actual text input.
Jonny DOn Wed, Jun 10, 2009 at 6:58 AM, Tim Jones wrote:
If you need specific help, check these links. What you want is the event
SDL_KEYDOWN and then check the sym (something like event.key.keysym.sym).
The key itself is a constant define; i.e., SDLK_q. If you’re curious, there
is no capital SDLK_Q, only key modifiers (that tell you shift is down, caps
is on, alt is pressed, etc.).http://lazyfoo.net/SDL_tutorials/lesson08/index.php
http://www.sdltutorials.com/sdl-events/It sounds like you’re very new to SDL, so, I’d check the tutorials if the
documentation confuses you.http://www.libsdl.org/intro.en/usingevents.html
Tim Jones
www.sdltutorials.comOn Wed, Jun 10, 2009 at 3:14 AM, Daniel Johansson <vild.vacker at hotmail.com> wrote:
Best advice: Check the documentation.
At least in my system the top level document is found at /[wherever you
unpacked it]/SDL-1.2.13/docs/html/index.htmlMore specifically you have the keyboard explained in chapter I-3: Input
handling / Handling the keyboard.There you can see how the SDL_keysym structure is built, and how to figure
out which key was pressed.Cheers
/ DanielTo: sdl at libsdl.org
From: jytgyl at gmail.com
Date: Wed, 10 Jun 2009 06:49:23 +0000
Subject: [SDL] sdl key queryHi
Is there any way by which I can get to know the corresponding character
when a
key is pressed?
for e.g
I press the alphabet q : can I get this information from the sdl key?
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Hitta k?rleken lagom till sommaren! Klicka h?r MSN Dejting
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org