THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/03/2005 at 15:33, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 9
Platform:
Language(s) : C++ ;
---------
Hi,
I am creating a ToolData plugin, and I would like to do a certain action when the mouse has moved, but while I press certain keys on the keyboard.
My first idea was to create a MouseDrag routine in ToolData::MouseInput, but while the drag is in process, the ToolData::KeyboardInput method is not called. So I cannot recieve which key has been pressed.
To combat this, I decided to transfer my code into ToolData::GetCursorInfo, and calculate the mouse position myself to simulate dragging.
This worked fine until the mouse cursor left the viewport window, which stopped my plugin from performing what its suppsoed to do.
Is there anyway I can retrieve keyboard input while a drag is in process?
I can recieve the state of keys such as SHIFT, CTRL etc, by using
BaseContainer keyResult;
GetInputState(BFM_INPUT_MOUSE,BFM_INPUT_MOUSELEFT,keyResult);
if ((keyResult.GetLong(BFM_INPUT_QUALIFIER) & QSHIFT) != 0)
GePrint("Shift pressed");
But I'm looking to find out what keys A,B,C,D....etc has been pressed.
Thanks