... keybd_event(vk_NumPad1, 0, KEYEVENTF_EXTENDEDKEY, 0); keybd_event(vk_NumPad1, 0, KEYEVENTF_EXTENDEDKEY or KEYEVENTF_KEYUP, 0); ...