chilimangoes / CasterUIAutomation_POC

GNU Lesser General Public License v3.0
4 stars 3 forks source link

Key events don't get passed to RPD session #2

Open chilimangoes opened 6 years ago

chilimangoes commented 6 years ago

In testing this with an RDP connection, the Key events don't seem to fire at all on a remote desktop. The ones in Dragonfly do fire, even if they often have timing/synchronicity issues when modifier keys (SHIFT, CTRL, etc) are used, so a good place to start is looking into the difference between how Dragonfly and the WindowsInput library trigger these keyboard events.

Versatilus commented 6 years ago

I haven't even looked at it yet so take this with the appropriate grain of salt, but I believe the difference is between using scancodes versus virtual keys. The Windows RDP client passes on scancodes, but it doesn't try to do anything intelligent with some of the messages Windows sends it.

On Mon, May 7, 2018 at 9:02 AM, Jacob Eggleston notifications@github.com wrote:

In testing this with an RDP connection, the Key events don't seem to fire at all on a remote desktop. The ones in Dragonfly do fire, even if they often have timing/synchronicity issues when modifier keys (SHIFT, CTRL, etc) are used, so a good place to start is looking into the difference between how Dragonfly and the WindowsInput library trigger these keyboard events.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/chilimangoes/CasterUIAutomation_POC/issues/2, or mute the thread https://github.com/notifications/unsubscribe-auth/ALpedYiIfK_Py_GFtIkut266Sp7FvZI4ks5twHAwgaJpZM4T1ONN .

chilimangoes commented 6 years ago

Yeah. Shortly after posting this, I had done a quick Google search on using SendInput with RDP and one of the stackoverflow posts that I ran across mentioned needing to set the scan code on the INPUT struct. And sure enough, WindowsInput doesn't set the scan codes. So I think it should be a fairly straightforward fix, once I get some free time.