fixed keycode detection for text_field and text_area, added keycode detect test