File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes How to simulate mouse click events to key events ? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "How to simulate mouse click events to key events ?" Watch "How to simulate mouse click events to key events ?" New topic
Author

How to simulate mouse click events to key events ?

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
For eg: If I click left click of the mouse it should fucntion as left arrow of the key board.
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Easily. At least in jdk1.1 event model.
Get the MouseEvent, create KeyEvent and send it via Component.processKeyEvent() method. You can play with any event types like this.
The example of case you described can be downloaded from http://druid.ml.org/~vps/Java/examples/Event.java.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: How to simulate mouse click events to key events ?
 
Similar Threads
Help me ,immediately !!!!
Capture Mouse Events on JTable
KeyPressed Problem
calling a JS function on mouse event
KeyListener() is sometimes deaf