0


My task is to create a remote keyboard, something like the TeamViewer keyboard.

Ok, i have two apps:

  • First one is server that accepts connections(socket) and listen for commands.
  • Second one is the client app that sends keyword commands to the server.

For example: If i have a session and hit the windows key, this key has to be sent and server has to receive the key and than has to hit it. Like i'm working on the server.

Please give an example.

NicolasMoise
  • 7,261
  • 10
  • 44
  • 65
Viruscom1000
  • 119
  • 12
  • Server side will install a keyboard hook and the client side will `SendInput`. – TLama Mar 26 '15 at 13:25
  • Thanks. Can you give me an example for the server ? When server receive the command, how to execute this command ? At the moment i can send key code to server, but i don't know how to activate this code on the server machine. – Viruscom1000 Mar 26 '15 at 13:31
  • 1
    Call [`SendInput`](https://msdn.microsoft.com/en-us/library/windows/desktop/ms646310%28v=vs.85%29.aspx). I'm sure there will be many examples around. – TLama Mar 26 '15 at 13:32

1 Answers1

0

Use a keyboard hook

Click here for an example:

http://delphi.about.com/od/windowsshellapi/a/delphi-hooks.htm

When you want to execute the shortcut remote use SendIndput read this for an example of how to use: SendInput vs. keybd_event

Community
  • 1
  • 1
Jens Borrisholt
  • 6,174
  • 1
  • 33
  • 67