You need to set the TERM environment variable to indicate to your console what type of terminal you're using.
The /usr/lib/terminfo directory contains directories that contain terminal database information. You can use the utilities tic and infocmp to change the mappings in the database.
For example, you could run infocmp on /usr/lib/terminfo/q/qansi-m, and this would generate the source for this database. You could then modify the source and then run the tic utility on that source to compile the source back in to a reconcilable database. The /etc/termcap file is provided for compatibility with programs that use the older single-file database model as opposed to the newer library database model.
For more information, see:
Strang, John, Linda Mui, and Tim O'Reilly. 1988. termcap & terminfo. Sebastopol, CA: O'Reilly and Associates. ISBN 0937175226.