vtk - How to generate a key press event in traitsui (Mayavi)? -


i have mayavi scene widget toolbar , want add button same behaviour pressing ctrl+c, ctrl+a (change between camera , actor interactor mode).

i think simulating key press event cliking in button simplest aproach that, question ¿how simulate key press event in traitsui (the mayavi gui toolkit)?

does know way perform same action ctrl+c, ctrl+a?

thanks in advance!

there no straightforward way simulate keypress event in mayavi scene or aware of in traitsui or enaml.

this extremely non-traithonic way of getting desired behavior. right way make calls tvtk interactor, asking right style:

self.scene.interactor.interactor_style.set_current_style_to_trackball_camera() self.scene.interactor.interactor_style.set_current_style_to_trackball_actor() 

Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -