Add key codes. Display only a maximum number of lines.