Crystal Space
Welcome, Guest. Please login or register.
December 19, 2014, 09:01:36 am

Login with username, password and session length
Search:     Advanced search
9032 Posts in 2046 Topics by 9289 Members
Latest Member: Kapifryba
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Development
| |-+  General Crystal Space Discussion
| | |-+  Keyboard keys
« previous next »
Pages: [1] Print
Author Topic: Keyboard keys  (Read 1839 times)
durochde
Newbie
*
Posts: 12


View Profile Email
« on: March 09, 2006, 06:42:55 pm »

Is there support for the uppper and lower case letters on the keyboard?  I noticed in the iutil/evdefs.h file that nothing was in there.  Could this support be in another file?  If so which file would it be in?  I am trying to setup the w, s, a and d keys.

Thanks
Logged
jorrit
Administrator
Hero Member
*****
Posts: 1706


View Profile
« Reply #1 on: March 09, 2006, 06:47:07 pm »

Is there support for the uppper and lower case letters on the keyboard?  I noticed in the iutil/evdefs.h file that nothing was in there.  Could this support be in another file?  If so which file would it be in?  I am trying to setup the w, s, a and d keys.

Thanks

Yes, upper is supported fine. Just use 'W' instead of 'w'.

Greetings,
Logged
durochde
Newbie
*
Posts: 12


View Profile Email
« Reply #2 on: March 09, 2006, 06:49:55 pm »

So, for example, you have:

if (kbd->GetKeyState (CSKEY_RIGHT))
      c->Move (CS_VEC_RIGHT * 4 * speed);
    if (kbd->GetKeyState (CSKEY_LEFT))
      c->Move (CS_VEC_LEFT * 4 * speed);

I can:

if (kbd->GetKeyState ( a ))
      c->Move (CS_VEC_RIGHT * 4 * speed);
    if (kbd->GetKeyState ( d ))
      c->Move (CS_VEC_LEFT * 4 * speed);

or:

if (kbd->GetKeyState ( A ))
      c->Move (CS_VEC_RIGHT * 4 * speed);
    if (kbd->GetKeyState ( D ))
      c->Move (CS_VEC_LEFT * 4 * speed);

Thanks
Logged
jorrit
Administrator
Hero Member
*****
Posts: 1706


View Profile
« Reply #3 on: March 09, 2006, 07:50:05 pm »

Ah for GetKeyState() you have to check for CSKEY_SHIFT in addition to 'a' I think. But try it.

Greetings,
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 3.181 seconds with 15 queries.