Character position or input override

I’m kind of new to flash, so bear with me if this is a stupid question:

I want to know what character in a dynamic text field is closest to a given position. That is apparently possible with static fields through TextSnapShot, but I don’t see how to do it with dynamic fields.

The problem I am trying to solve is to intercept whatever key the user presses and add a different character to the dtf (1-1 mapping between what they press and what I show). The snapshot-style position would be useful for making a pretend cursor on a pretend input text field, then calling replaceText based on the dtf where that cursor is.

Is there a way to do that? I think I could do it with a separate text field for each character and a global String to store the full variable, although I’m not sure how I will know the “nearest character” for the cursor in that model.

Thanks for the help.