I am not sure if the | is called a keyboard cursor. Anyways I have an input control and I will like to get the coordinates of where the | is.
In other words if my input tag gas the text:
hello world | bla bla
then I will like to get the coordinates of the keyboard cursor. by taking a guess that looks like 80px towards the right and 5px towards the bottom.
I know how to get the position of the cursor and then I can estimate the location by counting the number of characters but that is not reliable because some letters are wider than others. In other words I will be able to tell that the cursor is at position 12 by using this technique.
You can only have an exact value if you are using monospace fonts, and then multiplying the number of visible characters by the font width currently being used.