code: def key_event(self, key, action):
          
          if action == self.wnd.keys.ACTION_PRESS:
              if key == self.wnd.keys.SPACE:
                  print("Space was pressed")
  
          if action == self.wnd.keys.ACTION_RELEASE:
              if key == self.wnd.keys.SPACE:
                  print("Space was released")
docs: Handle key events in a generic way
          supporting all window types.