Synthesizes keystrokes, mouse motions, and button clicks.
Questions tagged [sendinput]
251 questions
4
votes
2 answers
PostMessage() to emulate input in c++?
I am attempting to make a simple botting program for a game. I want this to be functional even when the game is out of focus or minimized. Because of this, I cannot use SendInput() as it simulates global events. I figured out that, to make this…

Reed B
- 636
- 1
- 8
- 19
3
votes
2 answers
Send Ctrl Alt Del through INPUT Structure doesn't work?
How to simulate this ctrl alt del so that it will work ?
My code is as follows:
INPUT Input;
/* Generate a "key down" */
Input.type = INPUT_KEYBOARD;
Input.ki.dwFlags = KEYEVENTF_SCANCODE;…

Mak
- 1,057
- 1
- 12
- 30
3
votes
0 answers
Injecting Touchpad input on Windows
Background
I'm working on a program that shares input devices over a network to pass them into virtual machines. Currently, it works for Linux hosts and Linux guests. It uses the evdev interface, which is native to Linux, to read and write input…

Surferlul
- 31
- 4
3
votes
2 answers
SendInput fails on UAC prompt
We are writing a run-only remote desktop application, that uses SendInput for keyboard (& mouse) interaction. However it cannot interact with UAC prompts.
What permissions/rights does our application require for this?
Background info: The…

Norbert
- 41
- 3
3
votes
1 answer
When using SendInput how can I tell when the receiving window has received and processed the messages?
I'm using the Input Simulator library to simulate input to another application using C#, this uses the SendInput API calls. Does anyone know if there is a way I can monitor the windows message queue for the external application to see if those…

Will Calderwood
- 4,393
- 3
- 39
- 64
3
votes
1 answer
How do I add a delay between SendInput commands in AutoHotkey?
I have an AutoHotkey script using SendInput which sends MouseClick commands too quickly for my program to handle. My script will send a MouseClick to focus an input field, then start typing before the field finishes focusing.
I've tried using…

Stevoisiak
- 23,794
- 27
- 122
- 225
3
votes
1 answer
Sending scroll commands with SendInput on Windows10 UWP applications
I have code very similar to this question running in a windows tray application, even with this exact code from the question I get the same behavior. It all works well on classic windows applications, such as Firefox, Chrome, Windows Explorer etc.…

Vasil
- 36,468
- 26
- 90
- 114
3
votes
1 answer
How to SendInput to WinSta0\Winlogon desktop using C#/pinvoke
I'm writing a remote control application in C# for a suite of tech support tools. Everything works fine except that I'm unable to use SendInput to the Winlogon desktop. I'm successfully detecting the change from Default to Winlogon, and I'm able…

Jared
- 764
- 7
- 17
3
votes
1 answer
SendInput to background window
I want to send the mouse and keyboard input, which is recieved from android client, to games running on windows.
SendInput works for almost all games I have worked so far. But for SendInput to work the game must be a foreground window.
To solve that…

SMUsamaShah
- 7,677
- 22
- 88
- 131
3
votes
1 answer
VkKeyScan returning same code without modifiers for accented and unaccented letter
Background:
I am simulating keystrokes using the unmanaged function SendInput (https://msdn.microsoft.com/en-us/library/windows/desktop/ms646310(v=vs.85).aspx). There are 3 ways to call this function:
Specify a keyboard scancode
Specify a character…

Julius
- 735
- 1
- 9
- 25
3
votes
1 answer
SendInput fails after processing a hotkey containing "Ctrl"
I'm writing a Windows executable in Dephi 2007 (32 bit) which sends keystrokes to another application.
Pressing a hotkey or hotkey combination from within the other application causes my app to send keystrokes to that application. My approach works…

Mark Wilsdorf
- 751
- 1
- 5
- 18
3
votes
0 answers
virtual key "backspace" not working
I'm trying to implement a simulation of pressing a key (backspace) using Virtual-Key Codes.
Running the code while a text file is open works as expected (deletes the text), but running it while Win 8 photo App is open does not do anything (I would…

eskadi
- 245
- 3
- 17
3
votes
1 answer
simulating key press event using SendInput with C#
Following the advice from this thread: distinguish between keyboard's Real and Virtual key presses
I'm trying to create a program, that will send keyboard's key-press events using SendInput() method.
However, the problem is that when I try to…

Alex
- 4,607
- 9
- 61
- 99
2
votes
1 answer
Finding virtual screen width using multiple monitors and different DPI
I'm trying to simulate mouse input using SendInput, however I need to determine the virtual screen width in case there are multiple monitors, to set the dx and dy values, for example:
dx = (x * 65536) / SystemInformation.VirtualScreen.Width;
dy = (y…

Yves Calaci
- 1,019
- 1
- 11
- 37
2
votes
0 answers
Strange scancode 02 2A (554) on SendInput LShift
I have written a program to use an external (wireless) numpad as an input device for gaming. I am using NUMPAD0, NUMPAD. and ENTER for the modifier keys shift, ctrl and alt respectively and I've keymapped the rest of the numpad keys to WASD and some…

luksen
- 67
- 5