added some tests to TextArea according to keypresses during selection