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
    The Maxon SDK Team is currently short staffed due to the winter holidays. No forum support is being provided between 15/12/2025 and 5/1/2026. For details see Maxon SDK 2025 Winter Holidays.

    Detect modifier keys in command plugin?

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 414 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 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 Offline
        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 Offline
          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