Hmm, I just thought, why not simulate shift-left and shift-right keyboard events? That would solve the problem of the cursor ending up in the wrong spot. Almost wonderful (besides the slight seizure-inducing flicker that would surely result while using the mouse to make a selection), except that then you hit the keypress/not-knowing-where-the-cursor-will-be problem again. No dice. A killer bug combination.