handle direct text input