THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 29/10/2012 at 11:31, xxxxxxxx wrote:
Thanks for the answer but I just don't know what to do with it. There are not many examples to find how to use which input method.
Since I don't know where to start here's what would work for me (if I could just change it from ESC to CTRL) :
mode = True def KeyboardInput(self, doc, data, bd, win, msg) : if msg.GetLong(c4d.BFM_INPUT_CHANNEL) == c4d.KEY_ESC: self.mode = not self.mode return True return False
This works the way I want it. If I press ESC while I have my tool-plugin active, it switches the mode from true to false (which changes some colors and drawn polygons in the Draw function). Does your answer mean you can use CTRL and SHIFT only in conjunction with a mouse-event like clicking or another key?
I'm almost on giving up on CTRL or SHIFT and thought why not use a character key. Problem is I don't know how to check it. The SDK says >BFM_INPUT_CHANNEL
The channel contains the key or button ('A' means A, KEY_F1 means F1)
F1, F2, and so on work without problem, a character not so much. I tried c4d.A, not working, I tried it as a string 'A', and I'm running out of ideas :joy:
Maybe you could help me out here one more time.