Could really use some help on a quick question.

Status
Not open for further replies.

Android Assassin

Beta member
Messages
2
I am trying to find/figure out the code used for the "WIN+L" shortcut for use in a Java program I am making. I have looked and gotten that the WINDOWS Key is VK_LWIN, or 0x5B, and the L Key is 0x4C. But for the shortcut, what would the code be saying "Hey, these 2 keys are being pressed together."? I tried 0xA7, but that is the code for Browser Forward.

If this is a fairly stupid question, I apologize. Am just getting back into programming. Still reading up, but am obtaining information for my project.

Or if anyone knows Java well, what would be the best method for sending the key combination WIN+L to the PC?

(Yes, I am trying to create a button in my program that will lock/log off the user with a push of one button in the program)
 
Thanks for the reply office politics and kmote. I love the link you posted. Gave me an idea. Also, kmote, if you could elaborate on that more, possibly with a small example not pertaining to locking the computer that would be amazing.
 
I would suggest using a MACRO....read here ---> "http://stackoverflow.com/questions/193536/how-can-i-simulate-macros-in-javascript"
and here ---> "http://common-lisp.net/project/parenscript/"

PS: i know absolutely ZERO about java, but also program in a scripting-language called AutoIt...so the "idea" should be the same :)
 
Status
Not open for further replies.
Back
Top Bottom