'Handle keystrokes, as set at the bottom of __init__()
A plotting or camera frame window must have focus for keypresses to be
detected.'

def key_handler(self):

    self.pressed = (waitKey(10) & 255)
    if (self.pressed == 27):
        print 'Exiting'
        for cam in self.cameras:
            cam.cam.release()
        if self.send_serial:
            self.serial.close()
        sys.exit()
    for key in self.key_controls.keys():
        if (chr(self.pressed) == key):
            self.key_controls[key]()
