Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-26-2009, 07:09 PM
CodesAway's Avatar
Senior Member
 
Join Date: Sep 2009
Location: Texas
Posts: 236
Rep Power: 1
CodesAway is on a distinguished road
Default Check a key's state
I found out about the Robot class, and I wanted to implement some functionality found in AutoHotkey (a scripting language for windows, used for automation).

I was trying to program a getKeyState method (like the one in AHK) that would return true if the key is pressed, and false if released.

Is there anyway that I can check a key's state? I know I can monitor key events, but I'm not sure how to poll for whether a key is pressed or not.

Thanks for your help.
__________________
CodesAway - codesaway.info
writing tools that make writing code a little easier
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Save Scene State quddusaliquddus Advanced Java 1 09-21-2009 05:08 PM
Invalid Cursor State, what it is and how to avoid it tim Database 0 07-02-2009 11:42 AM
Time constraints on object state Flipke New To Java 4 04-11-2009 07:12 PM
Persisting state of objects JavaForums Java Blogs 0 12-11-2007 06:20 PM
Concurrent Hierarchical State Machine 4.3 levent Java Announcements 0 08-03-2007 05:44 PM


All times are GMT +2. The time now is 11:44 AM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org