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

    Detect modifier keys in command plugin?

    SDK Help
    0
    3
    405
    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 01/04/2003 at 14:52, xxxxxxxx wrote:

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

      ---------
      In a command plugin, how can I detect whether Ctrl, Shift, or Alt were pressed at the time the command was triggered?

      I'm wanting to have a clickable button whose behaviour is different if the modifier keys are pressed.

      Cheers - Steve

      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 04/04/2003 at 06:09, xxxxxxxx wrote:

        Just use GetInputState() :

            
            
            Bool MenuTest::Execute(BaseDocument *doc)  
            {  
             BaseContainer state;  
             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;
            
            
            
            
             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 05/04/2003 at 00:47, xxxxxxxx wrote:

          Thanks - that works.
          Cheers - Steve

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