Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Input Event

    SDK Help
    0
    11
    1.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 11/04/2003 at 12:32, xxxxxxxx wrote:

      Can't you use the the BFM_INPUT_MOUSE channel and look for the SHIFT qualifier in the result? (See another thread.)

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 11/04/2003 at 16:53, xxxxxxxx wrote:

        As I said, I don´t want a mouse movement for the detection. I just want to detect if the user pushes the SHIFT or ESC key without any mouse movement.
        Any chance?
        Thanks

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 13/04/2003 at 01:37, xxxxxxxx wrote:

          Hi Samir,
          The 'GetInputState()' tells you the current _state_ of the input, so it doesn't matter whether the mouse is moving or not. It's _not_ informing you of an event. I'm using the following code (provided by Mikael) to read shift and ctrl in a tool plugin, and it seems to work fine:

            
          GetInputState(BFM_INPUT_MOUSE,BFM_INPUT_MOUSELEFT, state);  
               Bool bShift = (state.GetLong(BFM_INPUT_QUALIFIER) & QSHIFT) != 0;  
               Bool bCtrl = (state.GetLong(BFM_INPUT_QUALIFIER) & QCTRL) != 0;  
          
          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 13/04/2003 at 01:43, xxxxxxxx wrote:

            Just as a quick hack - I tried the following, and it does correctly echo the current state of the Ctrl,Shift keys to the console, whether you touch the mouse or not.

            cheers - Steve

              
            Bool bShift, bCtrl;  
            while(1) {  
                  GetInputState(BFM_INPUT_MOUSE,BFM_INPUT_MOUSELEFT, state);  
                 bShift = (state.GetLong(BFM_INPUT_QUALIFIER) & QSHIFT) != 0;  
                 bCtrl = (state.GetLong(BFM_INPUT_QUALIFIER) & QCTRL) != 0;  
                 GePrint("shift: " + LongToString(bShift) + " ctrl: " +LongToString(bCtrl));  
            }  
            
            1 Reply Last reply Reply Quote 0
            • H
              Helper
              last edited by

              THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

              On 13/04/2003 at 02:26, xxxxxxxx wrote:

              Sorry, that doesn´t work for me unless I use the mouse. I don´t want to use the mouse. No clicking, no moving, just simply the shift key. 😕 I seem to forgot to say that I also don´t want it outside a mouseclick. Sorry, my fault. Thanks anyway, though the code was known...
              Does anybody know?

              1 Reply Last reply Reply Quote 0
              • H
                Helper
                last edited by

                THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                On 13/04/2003 at 10:49, xxxxxxxx wrote:

                Hmm, I'm a bit puzzled. The 'hack' code above works on my system without me touching the mouse - just the shift/ctrl keys...

                1 Reply Last reply Reply Quote 0
                • H
                  Helper
                  last edited by

                  THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                  On 13/04/2003 at 14:01, xxxxxxxx wrote:

                  maybe this works:
                  GetInputState(BFM_INPUT_KEYBOARD, 'A', inputdata);
                  qualifier=inputdata.GetLong(BFM_INPUT_QUALIFIER);

                  1 Reply Last reply Reply Quote 0
                  • H
                    Helper
                    last edited by

                    THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                    On 13/04/2003 at 14:58, xxxxxxxx wrote:

                    Hi Klaus,
                    thank you, I will try that tommorrow. One of those has to work I guess 🙂
                    @Steve: Thanks anyway for your help!

                    1 Reply Last reply Reply Quote 0
                    • H
                      Helper
                      last edited by

                      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                      On 14/04/2003 at 13:07, xxxxxxxx wrote:

                      I am guessing the reason it does not work is because you are trying to do so within a plugin tool ( one of those cool widgets possibly? ). The issue here as that none of those functions are called unless the mouse moves.

                      darf

                      1 Reply Last reply Reply Quote 0
                      • H
                        Helper
                        last edited by

                        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                        On 14/04/2003 at 15:30, xxxxxxxx wrote:

                        yes, it appears to be so. 😞 It doesn´t work for me.
                        Well, thanks anyway to all of you.
                        Best
                        Samir

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post