docstr: A plotting or camera frame window must have focus for keypresses to be
  detected.
docstr_tok: ["A","plotting","or","camera","frame","window","must","have","focus","for","keypresses","to","be","detected","."]
code: def key_handler(self):
      """
      A plotting or camera frame window must have focus for keypresses to be
      detected.
      """
      self.pressed = waitKey(1) & 255  # wait for keypress for 10 ms
      if self.pressed == 27:  # exit program on 'esc'
          print("[INFO] Exiting")
          self.webcam.stop()
          sys.exit()
  
imports: import cv2
  import numpy
  import imutils
  import scipy.signal
  import scipy.fftpack
  import time
  import sys
  from webcam import Webcam
  from video import Video
  from face_detection import FaceDetection
  from interface import waitKey, plotXY
label_desc: Use image node_id 16 for calling the VidMag obj's underlying member method code with example usage: obj.key_handler() without return types