I wanna tell OS that for example Right Key is released anyone can help me?
Printable View
I wanna tell OS that for example Right Key is released anyone can help me?
more details :
my program have a button
i wanna when user press button my program tell OS that right Key is Down
and when user released it my program tell OS that right Key is UP
(my problem is not key listening)
anyone can help me?
well i'm guessing he wants to build a keyboard simulator (just a guess but look at the thread name). Which would involve the program not being able to have focus, always on top, and able to send keystrokes to the OS (I'm guessing you would have to use some private libraries to access the win32 lib and make a low level keyboard hook (which would only work for windows)... or something
Collin389 thats correct
U said my mean
Can u help me what i should do exactly?
NoOne cant help me?:(
You have to 'fool' the OS making it think that your program is the keyboard driver but that is far 'below' the capabilities of Java, i.e. you have to use quite a bit of JNI code (native code) to do that. Take it from me: you don't want to go there, it is far from a trivial task (if at all possible using 'simple' Java and a bit of native code). Collin (and others) already told you that.
kind regards,
Jos
dear jos
fortunatly Robot class solved my problem
thanx a lot!
OK . I got it :)