code: def key_event_callback(self, window, key, scancode, action, mods):
          
          if key == self.keys.ESCAPE:
              self.close()
  
          self.example.key_event(key, action)
docs: Key event callback for glfw.
          Translates and forwards keyboard event to :py:func:`keyboard_event`
  
          Args:
              window: Window event origin
              key: The key that was pressed or released.
              scancode: The system-specific scancode of the key.
              action: GLFW_PRESS, GLFW_RELEASE or GLFW_REPEAT
              mods: Bit field describing which modifier keys were held down.