Click here to Skip to main content
15,791,739 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

I need to send a Keystroke from an active RDP Session to the Host.
I've tested some keystroke source codes, but they only work outside the RDP Session.
The software have to run on the host machine.


Thin Client with an "emergency" software (Windows XP or 7) which waits for a keystroke like Strg+Escape. The KeyStroke must be send to the host, no matter if the user is in an active rdp session or works localy. I cant pass any keys from rdp to the host.....

Is this possible ?


1 solution

Is this possible?? No, not over RDP it isn't.

You'd have to create some other communication channel outside the RDP session. Basically, your standard client-server setup, such as a server on the host machine and a client sending data to it over TCP/IP.
Share this answer
Elaay 15-Oct-13 11:00am    

thanks for the fast answer...

Client/Server App is a little bit "harder" to code for me than a keystroke logger which is only waiting for a predefined keystroke.

But another question, I've read that software keyloggers (like trojaners) works with RDP. How do they capture the keys from an RDP session ?

Dave Kreskowiak 15-Oct-13 14:35pm    
They're not capturing anynthing in the RDP session. They see the keystrokes before the RemoteDesktop app on the host even knows you hit a key.

BTW, be very careful with leyloggers. You're walking into legal territory with those.
Elaay 15-Oct-13 15:35pm    
Hello again,

I really dont want to code a keylogger :-) I only need to capture the keystroke Ctrl-Escape
or any other combination which is not used :-)

Just wanted to know how they could capture keystrokes because Dave said that its not possible
from and RDP Session to the Host.

I have a new idea. I will try to code the tool so it can run on both.
The ThinClient and the TerminalServer Session. So its assured that it will capture the keystroke
regardless of where the user is working (or connected).

I need following solution:

I'll have round about 20-30 ThinClients. I need a tool which will activate an alarm on keystroke
and send this alarm to all other thinclients with the information where the alarm is started
with Username and room number. Thought I could do following: If a user starts the alarm, a text
file will be written to a share. All other thin clients reads this text file every 1-2 second.
If there is an alarm text in the text file this will blink in large letters on all other thin

The idea with a Client/Server application over TCP/Ip is too hard for me :-)


Dave Kreskowiak 15-Oct-13 17:47pm    
For something like this you would only need to run it on the thin client, not the RDP session.

Using a file-share based solution is a bit problematic as it does not scale well. The amount of network and file I/O on the server increases with the number of clients "polling" for the file.

A TCP/IP is solution is better as a server component can be listening without any resource drain at all and notify all connected clients when necessary without all the constant network and file overhead.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900