code: def on_key_press(self, event):
      if event.key is not None and event.key.name in "1234":
          fname = "shape%s.tga" % event.key.name
          self._setup_textures(fname)
      elif event.key == "F1":
          self.use_shaders = True
      elif event.key == "F2":
          self.use_shaders = False
  
file_path: vispy/examples/demo/gloo/jfa/jfa_vispy.py
imports: import numpy
  from os import path
  import sys
  from vispy import app
  from vispy.gloo import Program, FrameBuffer, VertexBuffer, Texture2D, set_viewport
  from vispy.io import load_data_file, imread
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