Please check our Demo App's groups of XY examples "Cursor tracking". Those will provide with ideas how it could be engineered.
In general, you can use methods to convert screen coordinates to Axis' values