On 23/08/2015 at 01:52, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 15+
Platform: Windows ;
Language(s) : C++ ;
---------
I can't get focus properly on keyboard, somehow to get focus I need to do a click first with mouse, then it can read keyboard ONCE!!, I need it to get the keyboard keys anytime "not just once, or by a refreshing mouse click"
Bool SNodeUserArea::InputEvent(const BaseContainer& msg)
{
Int32 dev = msg.GetInt32(BFM_INPUT_DEVICE);
Int32 chn = msg.GetInt32(BFM_INPUT_CHANNEL);
if (dev == BFM_INPUT_KEYBOARD)
{
GePrint("key pressed");//prints only if I press mouse before keyboard...
if(chn == KEY_DELETE)
{
BaseContainer actionk(BFM_ACTION);
actionk.SetInt32(BFM_ACTION_ID, GetId());
actionk.SetInt32(BFM_ACTION_VALUE, 0);
actionk.SetInt32(BFM_ACTION_UPDATE, true);
removeSelectedNodes();
removeSelectedWires();
InvokeCommandCall(GetDialog(), COMMANDMSG_VALUECHANGED);
SendParentMessage(actionk);
return true;
}
}
else if (dev == BFM_INPUT_MOUSE)
{
...
}
return false;
}