Tag Archives: SendInput

Using SendInput to type unicode characters

I received a query from reader Partha D about generating unicode keystrokes using the SendInput function in Windows. As I understand it, Partha wants to generate one or more unicode keystrokes when a particular keyboard shortcut is pressed. The following … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , , , , , , , , | 2 Comments

Sending a key to a window that’s not in focus (C program)

In a previous post, I showed how a C program can simulate a keystroke in Windows using SendInput. I also posted a subsequent example showing how to simulate a keypress with the Control key included (e.g. Ctrl+V). In this post … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , , , , , , , , , , , , , , | 10 Comments

Simulating a Ctrl-V keystroke in Win32 (C or C++) using SendInput

This short example program simulates pressing Ctrl-V on the keyboard (the Windows shortcut for “Paste”) once every second. It’s a modified version of an earlier example I posted on keystroke simulation using the Win32 SendInput function. What’s different this time … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , | 44 Comments

Simulating a keystroke in Win32 (C or C++) using SendInput

This program is a simple example of using the Win32 SendInput function to generate a simulated keystroke. When you run this program, it simply waits 5 seconds and then simulates a press and release of the “A” key on the … Continue reading

Posted in Uncategorized | Tagged , , , , , , | 79 Comments