AttachThreadInput(currentProccess,dfProccess,TRUE);//The two threads have to have attached input in order to change the keyboard state, which is needed to set the shift state
AttachThreadInput(currentProcess,dfProcess,TRUE);//The two threads have to have attached input in order to change the keyboard state, which is needed to set the shift state
while((cChar=*input++))// loops through chars
{
shortvk=VkKeyScan(cChar);// keycode of char
if(useShift||(vk>>8)&1)// char is capital, so need to hold down shift
{
vk=vk&0xFF;// remove the shift state from the virtual key code