title: can't get the keycode now, using python and opencv
body: <p>okay, i've been using this basic thing for last few months to get key events such as ESC key, or E key etc, to do things when they are pressed in my opencv program.</p>
  
  <p>Now earlier, for detecting ESC key, the code was there already in all the examples in the samples folder and on the web. I understood that. From that i hacked up a way to get the keycodes for other keys, such as E and S etc. Because i wanted to use them to take snapshots of the current frames under processing in my program. And it worked, i found out for E its 101, like for ESC its 27
  But that's the ASCII value or something? I'm not sure.</p>
  
  <p>This is what i'm doing now also, but its just not printing the keycode:</p>
  
  <pre><code>import cv
  
  while True:
  
     k = cv.WaitKey(100) % 0x100
  
     if k != 255:
          print k
  </code></pre>
  
  <p>So that when i press some key which doesn't have a value of 255, i should be notified that the that key was pressed. It works in my opencv programs:</p>
  
  <pre><code>while True:
  
  
  
    k = cv.WaitKey(10)
  
    if k % 0x100 == 27: # if ESC key is pressed....
  
      #cv.SaveImage(filename,threshed2)
      cv.DestroyWindow("threshed") #Destroy the window of detection results
      cv.DestroyWindow("gray")
      cv.DestroyWindow("edge")
      cv.DestroyWindow("pupil")
      #cv.DestroyWindow('smooth')
      break
  
    elif k == 101: #if E is pressed
          eyeSnap = "C:\\Users\\ronnieaka\\Desktop\\PROJ\\openCV\\eyeSnaps\\det_pupil.jpg"
          cv.SaveImage(eyeSnap,image)
  </code></pre>
  
  <p>I know its a basic thing and i just was playing around to get the keys pressed and do something else not related to OpenCV
  Why i'm i not getting 101 from the previous code when i press E or the code for other keys when i press them?</p>