inputsimulator
inputsimulator copied to clipboard
TextEntry with \n or \r\n doesn't work on a RichTextBox
using the TextEntry method, the newlines work fine on notepad but don't work if the target is a System.Windows.Forms.RichTextBox
sim.Keyboard.TextEntry("foo\nbar") ; sim.Keyboard.TextEntry("foo\r\nbar") ;
I don't understand something, it works through sim.Keyboard.KeyDown('\r') sim.Keyboard.KeyUp('\r'). So I decided to look at what the difference is between the KeyDown, & TextEntry methods and what I wasn't expecting was that the KEYBDINPUT struct has different fields assigned between the two like Unicode flags, scan code & keycode. Both are doing keydowns & keyups so why are the different struct values assigned and what is the fundamental difference between the two?