0
votes

I want to get the caret (text cursor) position inside the active editor.

I know about the selection.active property, but it only tells you the line and character position, but I'm interested in the raw x, y screen coordinates.

Is this theoretically possible inside VSCode? Can I convert the selection.active into screen space coordinates or maybe somehow hook into raw mouse events?

1

1 Answers

1
votes

No. Getting screen space coordinates is not possible using the VS Code API. The one exception is inside of webviews

Support for this is also very unlikely to be added to normal editors