ssShift The Shift key is held down.
ssAlt The Alt key is held down.
ssCtrl The Ctrl key is held down.
ssLeft The left mouse button is held down.
ssMiddle The middle mouse button is held down.
ssDouble The mouse was double-clicked.
if ssShift in Shift then //Shift key in ShiftState
if ssCtrl in Shift then //Control key in ShiftState
if (ssShift in Shift) and (ssCtrl in Shift) then //Both Ctrl and Shift in
Example:
检查左边的那个Shift键盘有没有按下:
if ((GetKeyState(VK_LSHIFT) and &80)<>0) then
Begin
{ Haha, you are pressing the left Shift key, }
End
else
Begin
End;
Example:
不好意思,刚才哪个例子有点毛病,现在是真正在机器上通过的,
检查左边的那个Shift键盘有没有按下:
if ( ( integer(GetKeyState(VK_LSHIFT))
and integer($80)
)
<>0
) then
Begin
{ Haha, you are pressing the left Shift key, }
End
else
Begin
End;