title: Display when key is pressed in opencv
body: <p>There is a program which takes live feed from camera: I want to perform some operations when a key from keyboard is pressed without disturbing the on going process. I tried </p>
  
  <pre><code>if(waitKey(30) == '27')
    cout &lt;&lt; "ESC pressed";
  </code></pre>
  
  <p>But this one doesn't work.</p>