title: On Win32, how to detect whether a Left Shift or Right ALT is pressed using Perl, Python, or Ruby (or C)?
body: <p>On Win32, I wonder how to detect whether Left Shift or Right ALT is pressed using Perl, Python, or Ruby (or even in C)?  </p>
  
  <p>Not just for the current window, but the global environment overall.  Example: when I am typing a document, I can press Right ALT to start the music player written in Ruby, and then press Right ALT again and it can pause or stop the program.  thanks.</p>