Fixed auto-pair delay, and caret moving in the wrong direction.

This fixes auto-pairing only happening on keyUp, which gives the impression of delayed response, and makes the caret move to the left, inside the paired characters, instead of to the right, away from the paired characters.