SendInput Problem
hi there
im using SendInput Function to the target program which using GetAsyncKeyState funcion
when i Send VK_RIGHT once then target program working as recive VK_RIGHT key again and again
i found the reason why working as like that.
in msdn SendInput it says
"This function does not reset the keyboard's current state.
Any keys that are already pressed when the function is called might interfere with the events that this function generates.
To avoid this problem, check the keyboard's state with the GetAsyncKeyState function and correct as necessary."

so i tried to find way of reset the keyboard's current state. but i dont get it

i paste what i tried
void SendOnce(int vkey){//target working as recieve vkey infinitly
	INPUT input[2] = {0};
	input[0].type = input[1].type = INPUT_KEYBOARD;
	input[0].ki.wVk = input[1].ki.wVk = vkey;
	input[1].ki.dwFlags = 0;
	::SendInput(sizeof(input) / sizeof(INPUT), input, sizeof(INPUT));
	BYTE byKeyState[256] = {0};
	byKeyState[vkey] &= 0x00;
could somebody please help me?