Sendkey can only send keys to a process if it has a windows handle.
That happens when grr itself is the target process or it is called from inside ConEmu, WindowsTerminal or other console emulators. It even happens when a shell is run inside a shell.
Sending the keys to the first parent with windows handle causes insertion of the keys into the current shell.
Sendkey can only send keys to a process if it has a windows handle. That happens when grr itself is the target process or it is called from inside ConEmu, WindowsTerminal or other console emulators. It even happens when a shell is run inside a shell. Sending the keys to the first parent with windows handle causes insertion of the keys into the current shell.