0

I would like to know is there any alternates for the following C# function in java..

System.Windows.Forms.SendKeys.Send()

Basically i am doing an application that should send key presses to system that is for other applications.

like if i send

Ctrl+C Value

to the system, it should copy the selected content (in any other application, not in my application)

any other suggestions are also welcome

Willem Van Onsem
  • 443,496
  • 30
  • 428
  • 555
practice2perfect
  • 499
  • 1
  • 4
  • 19

2 Answers2

1

Java Robot.keypress(int keycode)

java doc : http://docs.oracle.com/javase/7/docs/api/java/awt/Robot.html

Steve
  • 11,696
  • 7
  • 43
  • 81
0

Your best bet will probably be to call the Windows API directly.

The call you would be using would be "PostMessage" from the windows API.

See the following link for a reference on how to call the Windows native API,

How to use winapi functions in java?

Community
  • 1
  • 1
George
  • 16