detect shift and ctrl hold in getcursorinfo



  • 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



  • 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



  • 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


Log in to reply