Interface IProcessInteractionService
- Namespace
- WindowSill.API
- Assembly
- WindowSill.API.dll
Provides methods for simulating keyboard input to windows and processes in the operating system.
public interface IProcessInteractionService
- Extension Methods
Methods
SimulateKeysOnLastActiveWindow(params VirtualKey[])
Simulates a sequence of key presses on the window that was most recently active before the current application gained focus. This is useful for sending keys back to the window the user was previously interacting with.
Task SimulateKeysOnLastActiveWindow(params VirtualKey[] keys)
Parameters
keysVirtualKey[]The sequence of virtual keys to simulate in the order they should be pressed.
Returns
- Task
A task that completes when all key simulation operations have been sent to the previously active window.
SimulateKeysOnWindow(WindowInfo, params VirtualKey[])
Simulates a sequence of key presses on the specified window by sending virtual key events directly to that window's message queue.
Task SimulateKeysOnWindow(WindowInfo window, params VirtualKey[] keys)
Parameters
windowWindowInfoThe target window that will receive the simulated key events.
keysVirtualKey[]The sequence of virtual keys to simulate in the order they should be pressed.
Returns
- Task
A task that completes when all key simulation operations have been sent to the target window.