Forum > Windows
Sending keystrokes to the previously focused app similar to how Autohotkey does.
GetMem:
@Rave
--- Quote ---That's a step in a good direction, however I can't use it as it depends on MouseAndKeyInput which doesn't support pressing alt (which would be an awful limitation of my program to have).
--- End quote ---
I removed MouseAndKeyInput.
--- Quote ---What I need is an ability to send specific keystrokes (like Ctrl+N or Alt+F4 to the previously focused application, not random text.
--- End quote ---
You can send Alt + F4, but you have to change the code a little bit. See attached project.
PS: When testing make sure the last focused window was notepad, otherwise you will send key combination to different random windows.
Navigation
[0] Message Index
[*] Previous page