I have a code here that should send the window ctrl+shift+left arrow. This should highlight the previous word. All that happens in the cursor moves to the beginning of the word as if only ctrl+left arrow were being pressed.

Maybe there is an easier method for selecting the previous word or there is something with my code below?

Code:
	if(flagcheck==1)
	{
		//select word text
		INPUT in1 = {INPUT_KEYBOARD};
		INPUT in2 = {INPUT_KEYBOARD};
		INPUT in3 = {INPUT_KEYBOARD};
		INPUT in4 = {INPUT_KEYBOARD};
		INPUT in5 = {INPUT_KEYBOARD};
		INPUT in6 = {INPUT_KEYBOARD};
		KEYBDINPUT k1 = {VK_CONTROL,0,0,0,0};
		KEYBDINPUT k2 = {VK_SHIFT,0,0,0,0};
		KEYBDINPUT k3 = {VK_LEFT,0,0,0,0};
		KEYBDINPUT k4 = {VK_LEFT,0,KEYEVENTF_KEYUP,0,0};
		KEYBDINPUT k5 = {VK_SHIFT,0,KEYEVENTF_KEYUP,,0};
		KEYBDINPUT k6 = {VK_CONTROL,0,KEYEVENTF_KEYUP,0,0};
		in1.ki = k1;
		in2.ki = k2;
		in3.ki = k3;
		in4.ki = k4;
		in5.ki = k5;
		in6.ki = k6;
		SendInput(1, &in1, sizeof(INPUT));
		SendInput(1, &in2, sizeof(INPUT));
		SendInput(1, &in3, sizeof(INPUT));
		SendInput(1, &in4, sizeof(INPUT));
		SendInput(1, &in5, sizeof(INPUT));
		SendInput(1, &in6, sizeof(INPUT));
	}