Check InputState in COFFEE [CLOSED]

On 08/06/2015 at 06:22, xxxxxxxx wrote:

User Information:
Cinema 4D Version:    
Language(s) :

I am trying to check if a modifierkey is pressed when I run a coffee Script.

I tried this code:

var bc = new(BaseContainer);
	var state = bc->GetInputState(BFM_INPUT_KEYBOARD, BFM_INPUT_CHANNEL);

But That doesnt work.

With Python I use this Code which Works:

bc = c4d.BaseContainer()
    if c4d.gui.GetInputState(c4d.BFM_INPUT_KEYBOARD,c4d.BFM_INPUT_CHANNEL,bc) :
        print "Qualifier Bitwise:",bc[c4d.BFM_INPUT_QUALIFIER]

Is there a way to check if a modifierkey is pressed when the Coffee-script gets fired?

On 08/06/2015 at 09:03, xxxxxxxx wrote:

Hi Holger,

I'm afraid the good old COFFEE SDK provides no means to simply get the input state of an input device.
The only functions in there are in the GeUserArea class. And you probably don't have a dialog to make use of it.
By the way, you are trying to call GetInputState() on a BaseContainer. That is bound to fail, even if there were functions to achieve something like this.