Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add callbacks for mouse/key events in gui.SceneWidget on the Python side #2610

Closed
prewettg opened this issue Nov 12, 2020 · 3 comments
Closed
Assignees

Comments

@prewettg
Copy link
Contributor

prewettg commented Nov 12, 2020

C++ can subclass gui::SceneWidget to override mouse and keyboard events; Python needs to have access to this, too. Having mouse and key events would enable things like:

@heiwang1997
Copy link

Hi, @prewettg thanks for this contribution.
Can we now use set_on_mouse or set_on_key for a o3d.visualization.O3DVisualizer in python? That would be very useful for people who want a quick shortcut key binding but do not want to completely re-write other widgets.

@prewettg
Copy link
Contributor Author

@heiwang1997 Our original thinking was that actions should take care of this case: you can add a callback function and you get a button at the bottom of the window and a menu item. The menu item should have a shortcut, which seems like it would solve your problem, but unfortunately the Dear ImGui library we are using for the UI doesn't support shortcuts at the moment (except on macOS because we use the native calls). If that would not be sufficient for your use case, please open a new issue, describe it, and assign to me.

@masmu-3di
Copy link

I would be really interested in this as well. I created a new issue for this, but was not able to assign it to @prewettg in it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants