Home/End key in text field behave like normal editor

Make Home/End key in text field work as expected in simplistic text
editors, instead of going to start and end of the whole text. Use
Ctrl-Home and Ctrl-End for that purpose.