To enable the home and end of line keys in Terminal, you just have to follow these instructions.
settings
;Key
Escape Sequence
__Home__
\033[1~
__End__
\033[4~
__Page Up__
\033[5~
__Page Down__
\033[6~
You might need to restart the app for the changes to work.
To enable scrolling in editors like vim
check out MouseTerm.