disabling X Y Z V keypress events #7854
-
First check
Commit to Help
Sample Code What is the problem, question, or error?Write a short description telling me what you are doing, what you expect to happen, and what is currently happening. # Disable interaction for the x, y z, v keys - option #1
self.plotter.clear_events_for_key("x")
self.plotter.clear_events_for_key("y")
self.plotter.clear_events_for_key("z")
self.plotter.clear_events_for_key("v")
# Disable interaction for the x, y z, v keys - option #2
def do_nothing():
pass
self.plotter.add_key_event("x", do_nothing)
self.plotter.add_key_event("y", do_nothing)
self.plotter.add_key_event("z", do_nothing)
self.plotter.add_key_event("v", do_nothing) DescriptionHi, in a pyvistaqt plotter I need to disable the standard keypress events X, Y, Z, and V, that in the standard implementation rotate the camera to view along the X, Y, Z axes respectively, or back to home view (with V). This is because I'm fixing the view point and I don't want the user to rotate is unexpectedly by pressing a key. I tried with the two options above, but the keypress events are still active. System Informationall OS ScreenshotsNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Also related to #1819 that got no answer. |
Beta Was this translation helpful? Give feedback.
-
This discussion answer will likely work for you: #6654 (comment) |
Beta Was this translation helpful? Give feedback.
This discussion answer will likely work for you: #6654 (comment)