Detecting Single Modifier Key Presses (Is HighLine Not Able?

<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 L., control, shift, option, command,
etc. keys are pressed as my scripts use that information to determine
what to do next. (The Caps L. is used most often as I can just set it
and walk away as the script runs.)


Thank you!

Richard F.