class_docstr: Manager for actions triggered by user interactions (key press, toolbar
  clicks, ...) on a Figure.
  
  Attributes
  ----------
  figure : `.Figure`
  keypresslock : `~matplotlib.widgets.LockDraw`
      `.LockDraw` object to know if the `canvas` key_press_event is locked.
  messagelock : `~matplotlib.widgets.LockDraw`
      `.LockDraw` object to know if the message is available to write.
class_docstr_tok: ["Manager","for","actions","triggered","by","user","interactions","(","key","press",",","toolbar","clicks",",","...",")","on","a","Figure",".","Attributes","--","--","--","--","--","figure",":","`",".Figure","`","keypresslock",":","`","~matplotlib.widgets.LockDraw","`","`",".LockDraw","`","object","to","know","if","the","`","canvas","`","key_press_event","is","locked",".","messagelock",":","`","~matplotlib.widgets.LockDraw","`","`",".LockDraw","`","object","to","know","if","the","message","is","available","to","write","."]
docstr: Set the keymap to associate with the specified tool.
  
  Parameters
  ----------
  name : str
      Name of the Tool.
  key : str or list of str
      Keys to associate with the tool.
docstr_tok: ["Set","the","keymap","to","associate","with","the","specified","tool",".","Parameters","--","--","--","--","--","name",":","str","Name","of","the","Tool",".","key",":","str","or","list","of","str","Keys","to","associate","with","the","tool","."]
code: def update_keymap(self, name, key):
      """
      Set the keymap to associate with the specified tool.
  
      Parameters
      ----------
      name : str
          Name of the Tool.
      key : str or list of str
          Keys to associate with the tool.
      """
      if name not in self._tools:
          raise KeyError(f"{name!r} not in Tools")
      self._remove_keys(name)
      if isinstance(key, str):
          key = [key]
      for k in key:
          if k in self._keys:
              _api.warn_external(
                  f"Key {k} changed from {self._keys[k]} to {name}"
              )
          self._keys[k] = name
  
imports: from matplotlib import _api, backend_tools, cbook, widgets
label_desc: Use image node_id 12 for calling the ToolManager obj's underlying member method code with example usage: obj.update_keymap(name, key) without return types