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:
Is it correct when receiving a keyboard event, for the value of
'getKey()' to be different whether or not shift, alt, or control are
held.  For example, on the current version, when 'a' is pressed,
getKey() returns 97.  When shift is held, 65 is returned.  When control
is held, 1 is returned.

Testing with the last stable release of osgProducer, similar results
occur with some (but not all keys).  For example, in this case control
'z' is the same whether or not control is held.

One other partial issue is keypress occurs multiple times if the key is
held.

I would like to know if there is:
a) A way to determine which exact key was pressed, irrespective of any
mod keys being held.
b) An ability to determine when a key is pressed without being repeated
(not really necessary, but could be useful)

If I recall, in Windows the WM_KEYUP and WM_KEYDOWN messages provide the
key in a representation neutral of any mod keys pressed.

- Eron

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

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

Reply via email to