title: Detect Caps Lock in Python curses
body: <p>For such a basic question, I'm surprised I couldn't find anything by searching...</p>
  
  <p>Anyways, I made a curses app in Python that assists in solving puzzles of a certain DSiWare game.  With it, you can take a puzzle and inspect the components of it individually.  The keys <code>qweasdzx</code> are used to paint tiles (the keys are arranged in some sort of palette).  Pressing one of these keys while holding Shift highlights tiles with that color.  I couldn't ask for a more natural control scheme.</p>
  
  <p>So it's a shame that, once again, Shift is giving me issues (last time I had issues with Shift, I earned a Tumbleweed badge).  Though this time, the problem is more or less Caps Lock, which completely screws up my program by reversing the functions.</p>
  
  <p>How can I detect the state of Caps Lock in Python with curses?</p>
  
  <p>EDIT: If you're going to suggest using a separate module, I probably should remind you that curses - and therefore my program - is in UNIX territory.</p>