RPA is such a versatile tool, it uses different technology for a different layer.
For Local machines, it uses sendmessage and postmessage APIs. For thin layer applications such as RDP and Citrix, it simulates software keypress similar to application.sendkeys