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
    • Recent
    • Tags
    • Users
    • Login

    detect shift and ctrl hold in getcursorinfo

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 271 Views
    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 Offline
      Helper
      last edited by

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

      On 15/11/2009 at 02:52, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   11.5 
      Platform:   Windows  ;   Mac OSX  ; 
      Language(s) :     C++  ;

      ---------
      Hello all,
      am serching a way to detect if user press and hold any qualifier button in my getcursorinfo in my tooldata plugin.
      my problem is to know if this key are holded without any mouse button pressed.
      thanks in advance
      Franz

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

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

        On 17/11/2009 at 06:47, xxxxxxxx wrote:

        Here some working code:

          
        Bool LiquidToolData::GetCursorInfo(BaseDocument *doc, BaseContainer &data, BaseDraw *bd, Real x,Real y,BaseContainer &bc)  
        {  
          BaseContainer state;  
          
          if (GetInputEvent(BFM_INPUT_KEYBOARD, state))  
          {  
              LONG key = state.GetLong(BFM_INPUT_QUALIFIER);  
          
              if (key & QSHIFT)  
                  GePrint("shift");  
              else if (key & QCTRL)  
                  GePrint("ctrl");  
          }  
          
          return TRUE;  
        }  
        

        cheers,
        Matthias

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

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

          On 18/11/2009 at 00:52, xxxxxxxx wrote:

          Thanks Matthias.
          😉
          Franz

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