Skip to content

How can I get the cursor position? #3009

Answered by psifertex
saruman9 asked this question in API
Discussion options

You must be logged in to vote

You'll want to use a UI plugin for this. You'll receive a UIContext object that will contain information like the view, selection, etc. snippets is one example plugin that does this but there are others.

https://github.com/Vector35/snippets/blob/master/__init__.py
(See specifically, the uses of the UIAction module)

note that this module isn't documented the normal way because it's exposed via PySide.

https://api.binary.ninja/cpp/class_u_i_context.html

In short, look for example plugins using the registerNotification API

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by saruman9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants