I'm trying to type an uppercase letter in an EditBox using the sendInput
function to press down Shift then sending a character then KeyUp for the character and for shift.
The Char comes in in the EditBox correctly, however, when I start typing in the EditBox it types everything in CAPS.
It seems that it does not release the Shift Key correctly. Below is my code:
input.Itype := INPUT_KEYBOARD;
input.ki.wVk := VK_LSHIFT;
SendInput(1, input, SizeOf(input));
input.Itype := INPUT_KEYBOARD;
input.ki.wVk := Word('T');
SendInput(1, input, SizeOf(input));
input.Itype := INPUT_KEYBOARD;
input.ki.dwFlags := KEYEVENTF_KEYUP;
input.ki.wVk := Word('T');
SendInput(1, input, SizeOf(input));
input.Itype := INPUT_KEYBOARD;
input.ki.dwFlags := KEYEVENTF_KEYUP;
input.ki.wVk := VK_LSHIFT;
SendInput(1, input, SizeOf(input));
Any help would be greatly appreciated.