Implements KeyListener so Enter inputs text.