pyvista.Plotter.add_key_event#
- Plotter.add_key_event(key, callback)[source]#
Add a function to callback when the given key is pressed.
These are non-unique - thus a key could map to many callback functions. The callback function must not have any arguments.
- Parameters:
- key
str
The key to trigger the event.
- callback
callable()
A callable that takes no arguments (keyword arguments are allowed).
- key