Attempt to break the low-level terminfo stuff out of Terminal.