Added terminfo support to keys