Generating system events in java

J

jiggaman

Hi,

I am trying to generate events using a simple java program. what i
am trying to do is essentially fake a event. for eg..here is what i
want to do. I want to write a program that will allow me to generate a
"CTRL+ESC" event. on a windows box when we press CTRL+ESC the start
menu pops up. typically what i want it to do is when i run my program
its should post the events such that it mimics a user pressing the
CTRL+ESC keys.

is this doable with the current java api. will i need to use any
native libraries?
i am desperate to have this working any and all help will be highly
appreciated.

thanx,

Jiggaman
 
M

Manish Jethani

jiggaman said:
I am trying to generate events using a simple java program. what i
am trying to do is essentially fake a event. for eg..here is what i
want to do. I want to write a program that will allow me to generate a
"CTRL+ESC" event. on a windows box when we press CTRL+ESC the start
menu pops up. typically what i want it to do is when i run my program
its should post the events such that it mimics a user pressing the
CTRL+ESC keys.

is this doable with the current java api. will i need to use any
native libraries?

AFAIK this is possible only with a native library. You'll need
to write a DLL that does the messaging stuff, and expose one
method through it. The JNI is your friend.

-Manish
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top