じゃなきゃ

if (Word(GetKeyState(VK_RBUTTON)) and $80) <> 0 then