docstr: Controls -
  a(A) - move left
  d(D) - move right
  w(W) - move up
  s(S) - move down
  x/X - rotate about x-axis cw/anti-cw
  y/Y - rotate about y-axis cw/anti-cw
  z/Z - rotate about z-axis cw/anti-cw
  space - reset view
  p(P) - print current view
  i(I) - zoom in
  o(O) - zoom out
docstr_tok: ["Controls","-","a","(","A",")","-","move","left","d","(","D",")","-","move","right","w","(","W",")","-","move","up","s","(","S",")","-","move","down","x\/X","-","rotate","about","x-axis","cw\/anti-cw","y\/Y","-","rotate","about","y-axis","cw\/anti-cw","z\/Z","-","rotate","about","z-axis","cw\/anti-cw","space","-","reset","view","p","(","P",")","-","print","current","view","i","(","I",")","-","zoom","in","o","(","O",")","-","zoom","out"]
code: def on_key_press(self, event):
      """Controls -
      a(A) - move left
      d(D) - move right
      w(W) - move up
      s(S) - move down
      x/X - rotate about x-axis cw/anti-cw
      y/Y - rotate about y-axis cw/anti-cw
      z/Z - rotate about z-axis cw/anti-cw
      space - reset view
      p(P) - print current view
      i(I) - zoom in
      o(O) - zoom out
      """
      self.translate = [0, 0, 0]
      self.rotate = [0, 0, 0]
  
      if event.text == "p" or event.text == "P":
          print(self.view)
      elif event.text == "d" or event.text == "D":
          self.translate[0] = 0.3
      elif event.text == "a" or event.text == "A":
          self.translate[0] = -0.3
      elif event.text == "w" or event.text == "W":
          self.translate[1] = 0.3
      elif event.text == "s" or event.text == "S":
          self.translate[1] = -0.3
      elif event.text == "o" or event.text == "O":
          self.translate[2] = 0.3
      elif event.text == "i" or event.text == "I":
          self.translate[2] = -0.3
      elif event.text == "x":
          self.rotate = [1, 0, 0]
      elif event.text == "X":
          self.rotate = [-1, 0, 0]
      elif event.text == "y":
          self.rotate = [0, 1, 0]
      elif event.text == "Y":
          self.rotate = [0, -1, 0]
      elif event.text == "z":
          self.rotate = [0, 0, 1]
      elif event.text == "Z":
          self.rotate = [0, 0, -1]
      elif event.text == " ":
          self.view = self.default_view
  
      self.view = self.view.dot(
          translate(-np.array(self.translate)).dot(
              rotate(self.rotate[0], (1, 0, 0)).dot(
                  rotate(self.rotate[1], (0, 1, 0)).dot(
                      rotate(self.rotate[2], (0, 0, 1))
                  )
              )
          )
      )
      self.program["u_view"] = self.view
      self.update()
  
file_path: vispy/examples/demo/gloo/terrain.py
imports: from vispy import gloo
  from vispy import app
  from vispy.util.transforms import perspective, translate, rotate
  import numpy
  from scipy.spatial import Delaunay
label_desc: Use image node_id 2 for calling the Canvas obj's underlying member method code with example usage: obj.on_key_press(event) without return types