Use termcap for key codes