Prev: key search in files
Next: Is there likely to be any problem with an embedded assert statementlike this?
From: Richard Fairbanks on 3 May 2010 13:44 <2.33GHz MBPC2D, Running OS X 10.6.3, Ruby 1.8.7 (173)> Greetings, folks! Quick question: Is there any way for Ruby to return the state of any of the keyboard modifier keys? I thought HighLine might be able to do so, but, AFAICT, it only returns keys that would appear in text. I just need to know if the Caps Lock, control, shift, option, command, etc. keys are pressed as my scripts use that information to determine what to do next. (The Caps Lock is used most often as I can just set it and walk away as the script runs.) Thoughts? Thank you! Richard Fairbanks -- Posted via http://www.ruby-forum.com/. |