Send Key
Sends keyboard input to a Java application window using the Java Access Bridge.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
info
If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.
Inputs
- Window Title - The title of the target window containing the Java application.
- Window Handle - The handle (HWND) of the target window.
Options
- Key Modifier 1 - The first key modifier (e.g., Ctrl, Alt, Shift).
- Key Modifier 2 - The second key modifier (e.g., Ctrl, Alt, Shift).
- Key Modifier 3 - The third key modifier (e.g., Ctrl, Alt, Shift).
- Key - The key or text to send to the application.
Output
This node does not produce any output values.
How It Works
The Send Key node interacts with Java applications through the Java Access Bridge to send keyboard input to a window. When executed, the node:
- Gets the target window context based on the Window Title and Window Handle
- If the window is found and valid, it processes the key modifiers and key input
- Converts the key modifiers and key to KeyCode values
- Sends the key combination to the window using SendKeys.SendKey
- If the window is not found or key sending fails, appropriate errors are thrown
Requirements
- Java Access Bridge must be enabled in the target Java application
- The target Java application window must be running and accessible
- Valid Window Title and Window Handle for the target window
Error Handling
The node will return specific errors in the following cases:
- Window not found
- Accessible context is not a valid window
- Keybinding could not be sent to the window
- General error during key sending
- General exceptions during execution
Usage Notes
- Ensure the Java Access Bridge is properly configured in your Java application
- The window must be in focus or able to receive keyboard input for the keys to be processed
- Key modifiers can be combined with a key or text input for complex keyboard shortcuts
- This node sends keys directly to the window, not to a specific element within the window
- The key input can be a single key or a sequence of characters
- Common use cases include sending keyboard shortcuts, entering text, or triggering menu commands