Using the Send() function is easy if you want to target the active window (even if you have to activate it first), but is it possible to send a keystroke more generally, such as to the System as a whole or to every process simultaneously? I'm trying to remap some keys to that the remapping applies everywhere for all windows and processes.
I thought about sending to Explorer.exe, but there may be dozens of Explorer processes (I set my systems up to run all explorer windows as a separate pro
And Here is one that does the ctrl key
Do Note I changed SendKeyLL to take flags for alt and ctrl keys and also made it so you don't strictly have to pass it a handle to user32
although in this case since we call it a lot it is advisable..
#include <MsgBoxConstants.au3>
#include <StructureConstants.au3>
#include <WinAPI.au3>
#include <WindowsConstants.au3>
Func SendKeyLL($sKey, $bCtrl = False, $bAlt = False, $vDLL = 'user32.dll