Fixed keyinput_tcp so that arrow keys don't crash program