This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > VRML > December 2004 > VRML KbdSensor
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Tim Christopher 2004-12-15, 7:21 pm |
| Hi,
I'm using a KbdSensor to detect what keys the user presses and so move an
object on screen. It all works well until the user releases more than one
key at the same time.
I'm currently using KS.keyDown to detect when the press the key and then
reversing the action on KS.keyUp. However, if the user holds down both 'W'
and 'D' the releases them together only one KS.keyUp event is triggered -
this leaves the object moving even though no keys are being held down.
Does anyone know if there is a way to detect which keys are currently being
pressed, or if there is another way to overcome this problem.
Cheers,
Tim Christopher
| |
|
| well KbdSensor is plugin specific ( not VRML ) so you might try the
plugin people, but because these events bubble through from the os, it
could be a plugin-to-browser problem, or a plugin-to-browser-to-os
problem, so it might be browser/plugin/os combination specific.
BTW keyUp/Release events arn't that well used, so i'm thinking will
tend to have a higher bug rate.
you're basically going to have to work round it, try a different
browser/plugin/os combination ( hard work, and then everyone using it
will have to have the same setup!! ), or try the x3d keySensor node.
http://www.web3d.org/x3d/specificat....html#KeySensor
simon.
| |
|
| well KbdSensor is plugin specific ( not VRML ) so you might try the
plugin people, but because these events bubble through from the os, it
could be a plugin-to-browser problem, or a plugin-to-browser-to-os
problem, so it might be browser/plugin/os combination specific.
BTW keyUp/Release events arn't that well used, so i'm thinking will
tend to have a higher bug rate.
you're basically going to have to work round it, try a different
browser/plugin/os combination ( hard work, and then everyone using it
will have to have the same setup!! ), or try the x3d keySensor node.
http://www.web3d.org/x3d/specificat....html#KeySensor
simon.
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|