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
    • Register
    • Login

    Shift Cntrl Atl ...

    Scheduled Pinned Locked Moved SDK Help
    4 Posts 0 Posters 404 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 06/09/2005 at 02:00, xxxxxxxx wrote:

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

      ---------
      Hello ...

      I want to know how can I know if the user is pressing Shift or Cntrl or Alt .. while using his mouse ... I'm using a Tool plugin ..

      I tried these code below ...

      LONG Key = msg.GetData(BFM_INPUT_CHANNEL).GetLong();
      LONG ExKey=msg.GetLong(BFM_INPUT_QUALIFIER);

      if(ExKey==QSHIFT)
      {
         MessageDialog("Shift is pressed");
      }

      MessageDialog(LongToString(Key));

      But the dialog "Shift is pressed" is shown only when I press Shift and the other key like 'A' or 'B' ...
      So if I pressed only Shift key ( or Ctrl or Alt ) ... can I know it ... in anyway ...

      Thanks in advance ...
      ZawMinTun

      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 06/09/2005 at 10:52, xxxxxxxx wrote:

        Hi,

        try this:

          
        BaseContainer state;  
        LONG keyState;  
          
        if (GetInputState(BFM_INPUT_MOUSE, BFM_INPUT_MOUSELEFT, state))  
        {  
           keyState = state.GetLong(BFM_INPUT_QUALIFIER);  
           if (keyState == QSHIFT)  
           {  
           ...  
           }  
        }  
        
        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 06/09/2005 at 12:55, xxxxxxxx wrote:

          Hi

          the qualifiers are combined bitwise. So you can check each one by

          if( key&QSHIFT; )
          {
          // shift down
          }
          if( key&CTRL; )
          {
          // ctrl down
          }
          ..
          ..

          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 08/09/2005 at 21:09, xxxxxxxx wrote:

            True ...
            So now I can solve my problem ...
            Really thank both of you ...

            Let's meet again ...
            With all my respects ...
            ZawMinTun

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