Synthesizes keystrokes, mouse motions, and button clicks.
Questions tagged [sendinput]
251 questions
2
votes
1 answer
F# System.Runtime.InteropServices native library call to SendInput works in .net framework but not in .net core
I'm porting a small application I wrote for keybindings to .net core and I've run across an instance where the same code behaves differently. I'm calling the SendInput function in F# with this declaration
open…

Anthony Naddeo
- 2,497
- 25
- 28
2
votes
0 answers
Why can't my code send characters like "@" and "~" to another window using Java JNA?
I am creating a software to store passwords in order that they can be send to login windows of tokens. The problem is that some characters like "@" and "~" aren't send.
To show you the problem, I've changed the target window from the login window of…

Renato
- 29
- 3
2
votes
1 answer
Underscores do not get displayed with SendInput On C++
This is my first question I have posted on stackoverflow. I have been looking into SendInput for C++ in order to have my program 'type' into another program. I decided to start out by having it 'type' in a couple words with underscores into the…

Gavin Downard
- 23
- 4
2
votes
0 answers
Simulate a long key press
I am doing a small project to issue keyboard messages based on the position of a joystick.
The keyboard messages are simulated using SendInput().
Individual keys work properly. My problem is with simulating a key that is held down for a long period.…

JayD
- 53
- 1
- 6
2
votes
1 answer
How do I reconcile Sendmessage, SendInput, Mouse_event blocked by Getasynckeystate?
TL;DR:
I need to use both sendmessage and sendinput in order to get into an old function/event in a program that I can't re-build. While in there, I can't release the virtual mouse click using any of the methods I used to get in there in the first…

Eric Scott
- 31
- 2
2
votes
1 answer
SendInput mouse time
So basically what I'm trying to do is move my mouse smoothly to the center.
What I have here works fine, but it teleports the cursor instantly to the center.
Also if I set input.mi.time to a value larger than 0, it puts my PC to sleep. Can anyone…

Kordnak
- 165
- 10
2
votes
1 answer
Simulating XButton input using SendInput
I using SendInput to simulate mouse input and so far I can successfully simulate left, right and middle clicks. However, I cannot seem to simulate the xButtons properly. I am defining an input structure as follows:
Win32.INPUT i = new…

Alex
- 69
- 5
2
votes
1 answer
Convert KeyEventArgs to KEYDBINPUT struct
I am working on a networked system (in C#) where on one computer I receive keyboard input via a low level hook and then transmit the input to another computer where it has to be injected.
The hook delivers the keyboard input in a KeyEventArgs…

Harald
- 1,007
- 1
- 14
- 27
2
votes
2 answers
Powershell SendKeys Access Denied When Invoked Remotely
I'm testing a program that listens for key presses on remote machines, so I need to generate them somehow, and preferably only using powershell core.
I'm getting Access Denied (win32 exception or dotnetmethod exception) when I try to use SendKeys on…

GhostSparkles
- 101
- 2
- 10
2
votes
1 answer
SendInput showing data sent out of sequence
I am experimenting with SendInput by sending strings to a memo. I mix the SendInput commands with calls to Memo.Lines.Add('....'). To my surprise all the Memo.Lines.Add commands execute before any of the SendInput routines. Why? How can I get…

Rudi
- 203
- 2
- 12
2
votes
0 answers
Window ignore SendInput key
I'm trying to automate the insertion of some data in a software. This software has a popup window that require a password with a textfield and 2 button.
My intent is to write that password and press ENTER on that field with a powershell script.
I've…

Mix Kira
- 107
- 1
- 8
2
votes
1 answer
C++ SendInput possible in Windows Service?
First off, I'd like to say that I've used StackOverflow for years, and this is the first time I haven't found an existing answer. A testament to what a valuable resource this is.
Background:
I'm trying to catch MIDI input from a connected device…

Grahldg
- 21
- 2
2
votes
0 answers
C# - SendInput() - Hold Key Down?
Current Functionality
In a Direct3D environment, the key is held down. In a non Direct3D environment, it is simply pressed once.
public static void HoldKey()
{
//Type = 1 means keyboard input.
INPUT IP = new INPUT { Type = 1…

Synthetic Ascension
- 199
- 1
- 16
2
votes
2 answers
Mouse moves to original location after crossing montiors
I can't test different Windows versions, but I suspect it's a Windows 8 issue (due to the corner and side hotspots).
I'm trying to move the cursor to specified coordinates using SendInput, SetCursorPos, mouse_event and MoveMouse from Autohotkey and…

Nathan
- 56
- 5
2
votes
2 answers
"INPUT" is innaccesible due to its protection level
Im trying to build a small app that would send input to a game. After searching for a while, I found many answers that suggest SendInput should be used.
Below there is the code that I'm working on (basically doing a lots of tests to see what works,…

eemerge
- 75
- 2
- 9