I have an application that closes (crashes?) when SendKeys() sends it a SHIFT keystroke. The shift key could be invoked by simple shift character, +, a capital letter or indirectly by sending a secondary key such as @. In any of said cases, the app will close. This is a third party application so I cant fix their code.
I worked around the capital problem by inserting {CAPSLOCK}. That doesn't solve the secondary key problem. Is it possible to have SendKeys send special characters without invoking Shift? The characters: !@#$%^&*(){}|:"<>?
[Perhaps by converting them to a unicode representation first or something. I don't want to map all of those characters to Unicode manually. Not sure if underlying code will still tap SHIFT]?
UPDATE
Here's the code as requested.
SetForegroundWindow(windowHandle);
string keySequence = stringVariable + "{TAB}" + "aa";//works fine
//string keySequence = stringVariable + "{TAB}" + "a+a";//crash
//string keySequence = stringVariable + "{TAB}" + "aS";//crash
//string keySequence = stringVariable + "{TAB}" + "a@";//crash
SendKeys.SendWait(keySequence);