Programming a Quake like Console in Windows 2K
Hi There
I am Programming a Engine called Silencium. For this i am writeing a Quake like Console. But i am working in Windows2K and a can''t get any Keyboard input.
I only have the keycode ( by WM_KEYDOWN ) and the array of all keys. GetAsyncKeyState doestn work ( and i dont know why)
Do you know where i can get a code of a working Console ( perhaps not in Glut), of can you say me how a can get a Charakter code from the Keyboard!
thanks Jankey
Hi Guys My name is J@nkey & I am a VC und VB Freak and i LOVE GL and D3D. (And I hate Bill Gates)
J.A.N.K.E.Y.: Journeying Artificial Nocturnal Killing and Exploration Youth
Hullo Jankey!
There are several ways of doing that. The easiest way is
probalby to look for WM_CHAR messages instead which tells you
which character that was pressed.
One other way is to make a lookup-table that maps VK codes to character values, but then you have to keep track of what state
the modifier keys (shift, alt, caps-lock) is in, so this approach is prolly a bit more messy.
Good luck!!
------------------------------
- Derwiath -
There are several ways of doing that. The easiest way is
probalby to look for WM_CHAR messages instead which tells you
which character that was pressed.
One other way is to make a lookup-table that maps VK codes to character values, but then you have to keep track of what state
the modifier keys (shift, alt, caps-lock) is in, so this approach is prolly a bit more messy.
Good luck!!
------------------------------
- Derwiath -
------------------------------- Derwiath -
quote:
Original post by Jankey
Hi There
I am Programming a Engine called Silencium. For this i am writeing a Quake like Console. But i am working in Windows2K and a can''t get any Keyboard input.
I only have the keycode ( by WM_KEYDOWN ) and the array of all keys. GetAsyncKeyState doestn work ( and i dont know why)
Do you know where i can get a code of a working Console ( perhaps not in Glut), of can you say me how a can get a Charakter code from the Keyboard!
thanks Jankey
Hi Guys My name is J@nkey & I am a VC und VB Freak and i LOVE GL and D3D. (And I hate Bill Gates)
Let me clear something here as I program on Win2K myself and GetAsyncKeyState() works just fine. Now, your system might be experiencing some problems if that function doesn''t work or you might need to re-install Visual Studio but it works fine for me...
"And that''s the bottom line cause I said so!"
Cyberdrek
Headhunter Soft
A division of DLC Multimedia
Resist Windows XP''s Invasive Production Activation Technology!
"gitty up" -- Kramer
[Cyberdrek | ]
If you like I can send you my console source, it has worked in Win2K so you should be fine, let me know if you want it. It has a scrolling blended background accepts any user text and supports specific console commands in the form "/ " which are added at runtime.
My address is standingintheshadows@hotmail.com. Give me a buzz
FatalXC
My address is standingintheshadows@hotmail.com. Give me a buzz
FatalXC
Damnit, that console command format is "/(commandname) (commanddata)"
I put ''<'' and it thought it was some web thing.
I put ''<'' and it thought it was some web thing.
Thx ... but i have found an easy way in the Soucecode of the GLUT ... it is easy and works fine
______________________________________________________________
int temp = MapVirtualKey( keycode , 2 );
if (isascii(temp) && (temp != 0))
{
if ( !(GetKeyState(VK_SHIFT) < 0))
temp = tolower(temp);
Console.getInput( (char)temp );
}
______________________________________________________________
or does anyone have an Easier version?
______________________________________________________________
int temp = MapVirtualKey( keycode , 2 );
if (isascii(temp) && (temp != 0))
{
if ( !(GetKeyState(VK_SHIFT) < 0))
temp = tolower(temp);
Console.getInput( (char)temp );
}
______________________________________________________________
or does anyone have an Easier version?
J.A.N.K.E.Y.: Journeying Artificial Nocturnal Killing and Exploration Youth
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement