David Johansson wrote:
Hi Eron,

quick answer, hope it helps some :)
its been a while since i tackled this problem..

getKey() 97 = a, 65 = A

I use an array[255] and on keydown set array[getKey()]=1 and on keyup
set array[getKey()] =0

Then you can check this array for witch keys are pressed at the moment.

David

On 4/14/07, Eron Steger <[EMAIL PROTECTED]> wrote:

Thanks David, but I think you misunderstood my issue.

The problem isn't determining which keys are being held at any given time, but the fact that a single key on the keyboard can be represented by different results from the 'getKey' function.

Ideally for something like the 'a' key, I'd like to get the same result from 'getKey()' whether or not shift (or alt or control) are held. Since it appears that this is by design for 'getKey()', perhaps it makes sense to add an additional method to osgGA::GUIEventAdapter that returns a key code that provides a one-to-one mapping with individual keys.

- Eron
_______________________________________________
osg-users mailing list
[EMAIL PROTECTED]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to