Shift Cntrl Atl ...



  • 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



  • 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)  
       {  
       ...  
       }  
    }  
    


  • 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
    }
    ..
    ..



  • 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


Log in to reply