differentiate mouseclick and ctrl_mouseclick, my code does not work

 
void OnChartEvent(const int id,
                  const long &lparam,
                  const double &dparam,
                  const string &sparam)
  {
   string lastmove;

   if(id==CHARTEVENT_CLICK && lastmove!="ctrl")
     {
      Print("clicked");
      lastmove="clicked";
     }

   if(id==CHARTEVENT_MOUSE_MOVE && sparam==9)   // dunno why, but my bit state of "ctrl_leftclick" is 9 instead of 4
     {
      Print("ctrl");
      lastmove="ctrl";
     }
  }

With the above code, I want to achieve: when I ctrl+leftclick, it only shows "ctrl", no "clicked". But in fact, when I press ctrl and hold down left mouse button, it shows "ctrl", then when I release it, it says "clicked", which is weird. I might have understood it wrong, for example, why "id" could be CLICK and MOUSE MOVE at the same time? 

 

CHARTEVENT_CLICK only fires when the mouse click is up. 
CHARTEVENT_MOUSE_MOVE can be used to identify click down and up by mouse instead.
To get the keyboard ASCII codes including the CTRL press the wanted key in here .
For instance, pressing CTRL will get 17.
* or just run this and press the desired key to show the key code.

#define TAB_CONTROL_ADDED 17      // control added to tab control
bool   MouseDown = false, MouseClicked = false;
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//---
//--- set the flag of receiving chart object removal events
   ChartSetInteger(ChartID(),CHART_EVENT_MOUSE_MOVE,true);
//---
   return(INIT_SUCCEEDED);

  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//---

  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void OnChartEvent(const int id,
                  const long &lparam,
                  const double &dparam,
                  const string &sparam)
  {
//--- the key has been pressed
   if(id==CHARTEVENT_KEYDOWN)
     {
      switch(lparam)
        {
         case TAB_CONTROL_ADDED:
            Print("ctrl");
            break;
         default:
            Print("key ",(int)lparam);
            break;
        }
     }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
   if(id==CHARTEVENT_MOUSE_MOVE)
     {
      if(MouseLeftButtonState((uint)sparam) == "DN" && !MouseDown)
        {
         MouseDown = true;
         Print("Mouse down");
        }
      if(MouseLeftButtonState((uint)sparam) == "UP" && MouseDown)
        {
         MouseDown = false;
         Print("Mouse up");
        }

     }
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
string MouseLeftButtonState(uint state)
  {
   string res;
   res+=(((state& 1)== 1)?"DN":"UP");   // mouse left
   return(res);

  }