code: def on_key_press(self, event):
      modifiers = [key.name for key in event.modifiers]
      print(
          "Key pressed - text: %r, key: %s, modifiers: %r"
          % (event.text, event.key.name, modifiers)
      )
  
file_path: vispy/examples/tutorial/app/app_events.py
imports: from vispy import gloo, app
label_desc: Use image node_id 4 for calling the Canvas obj's underlying member method code with example usage: obj.on_key_press(event) without return types