Detect CTRL + RightMouseButton in SceneHook
-
As the topic title says, I am trying to detect a CTRL + RightMouseButton in a scenehook.
I managed to get this working in R20, as was discussed here:https://developers.maxon.net/forum/topic/14149/detect-ctrl-rightmousebutton-in-scenehook
Trying the same with version 2023, still using the same code:
if (msg.GetInt32(BFM_INPUT_CHANNEL) == BFM_INPUT_MOUSERIGHT) { BaseContainer keyChannels; if (GetInputEvent(BFM_INPUT_KEYBOARD, keyChannels)) { Bool ctrlModifier = (keyChannels.GetInt32(BFM_INPUT_QUALIFIER) & QCTRL) != 0; if (ctrlModifier) { ApplicationOutput("SceneHook - MouseInput: RMB + CTRL was pressed"); return true; } } }
Unfortunately, the 'GetInputEvent' does not seem to get any result.
Tested with R25 and version 2023.1.3
I am using priority value of 2001. -
I did not tried since it's week-end, will do next week, but out of my head I would say it's the same issue you already encountered How to detect CTRL being pressed in a GeDialog use GetInputState instead of GetInputEvent.
Cheers,
Maxime. -
Thanks for taking the time to respond, even during the weekend.
I must say this is quite embarrassing: I already had forgotten about the response in the other thread, and it's not even 3 weeks old.
I sincerely apologize for wasting your time with this duplicate thread.I can confirm the GetInputState is working fine, no need to waste more of your time trying it out.
Thanks again.