THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 29/10/2012 at 18:39, xxxxxxxx wrote:
You're right.
Something is definitely off when it comes to getting the state of the qualifier keys. But only when trying to do it inside of python plugins.
This also looks like it might be intentional.
This is how to get the state of the Ctrl key in C++.
When you press the Ctrl key you get the expected print return
GetInputState(BFM_INPUT_KEYBOARD, BFM_INPUT_CHANNEL, msg);
if(msg.GetLong(BFM_INPUT_QUALIFIER) & QCTRL)
{
GePrint("You pushed the ctrl key");
}
This is the same code. Only written in python.
However..You don't get any return until you have the Ctrl key pressed.. ** then**..some other key pressed at the same time
c4d.gui.GetInputState(c4d.BFM_INPUT_KEYBOARD, c4d.BFM_INPUT_CHANNEL, msg)
if msg.GetLong(c4d.BFM_INPUT_QUALIFIER) & c4d.QCTRL:
print "You pushed the ctrl key"
This looks to me like someone maybe decided that they didn't like the way C++ could get a return from just pressing the Ctrl key by itself. So they intentionally re-wrote the python version so we have to press a second key to get a return from the BFM_INPUT_QUALIFIER's.
We'll need to hear from Yannick or Sebastian about what's going on with these qualifier keys.
-ScottA