pyvista.RenderWindowInteractor.add_key_event#

RenderWindowInteractor.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:
keystr

The key to trigger the event.

callbackcallable()

A callable that takes no arguments (keyword arguments are allowed).