Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TextEntry with \n or \r\n doesn't work on a RichTextBox #25

Open
michaelgorman opened this issue Jul 19, 2019 · 1 comment
Open

TextEntry with \n or \r\n doesn't work on a RichTextBox #25

michaelgorman opened this issue Jul 19, 2019 · 1 comment

Comments

@michaelgorman
Copy link

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") ;

@michaelgorman
Copy link
Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant