Hi @R Hartley , Thanks for the details!
is SendKey() broken or disable?
I don't think SendKeys() is broken or disabled on Windows 11. Since it is still supported in the current RDP ActiveX control in the document (MsRdpClient11NotSafeForScripting class).
If the method appears to do nothing, it’s usually due to how the parameters are passed rather than an OS issue.
You can check a few things to see if it meets the requirement:
- Ensure the session is fully connected and the control has focus before calling
SendKeys. (See Keyboard Input Overview) - Use
VARIANT_BOOLvalues (VARIANT_TRUE/VARIANT_FALSE) for the key up/down array. - For Windows key combinations (like
Win + LorAlt + Tab), confirm the “Apply Windows key combinations” setting is configured to send them to the remote session. See: KeyboardHookMode property. - For security reasons, sequences like
Ctrl + Alt + Delcan’t be sent programmatically; useCtrl + Alt + Endinstead. See Terminal Services Shortcut Keys. - ALT-based shortcuts may require the remote app to see them as system keys, which depends on the context bit in the key data. (See WM_SYSKEYDOWN)
Hope this helps! If you still have any questions, please feel free to comment below. I'll be happy to assist you!