KBDLLHOOKSTRUCT *pkbhs = (KBDLLHOOKSTRUCT *)lParam;
// qDebug() << pkbhs->vkCode ;
BOOL bControlKeyDown = 0;
int c = pkbhs->vkCode;
if(!(pkbhs->flags>>7)&1)//按下
{
if(c==13)
{
if(pkbhs->flags&1)
{
c = 600;
}
}
if(c == 92)
{
c = 91;
}
#ifdef QT_DEBUG
qDebug() << "---------------";
qDebug() << pkbhs->vkCode ;
#endif
if(!DowOrUp)
{
if(c == LineKey[0]||c == LineKey[1]||c == LineKey[2])
{
return true;
}
if(!(LineKey[0]==91||LineKey[0]==92||(LineKey[0]>159 && LineKey[0]<166)))
{
return true;
}
getFlag = true;
if(!(LineKey[1]==91||LineKey[1]==92||(LineKey[1]>159 && LineKey[1]<166)))
{
LineKey[1] = c;
return true;
}
if(!(LineKey[2]==91||LineKey[2]==92||(LineKey[2]>159 && LineKey[2]<166)))
{
LineKey[2] = c;
return true;
}
if(!(LineKey[0] > 0))
{
LineKey[0] = c;
}
else if(!(LineKey[1] > 0))
{
LineKey[1] = c;
}
else if(!(LineKey[2] > 0))
{
LineKey[2] = c;
}
}
else
{
LineKey[0]=c;
LineKey[1]=0;
LineKey[2]=0;
LineKey[3]=0;
LineKey[4]=0;
DowOrUp = false;
getFlag = true;
}