If you, like me, have a Mac or a MacBook and connected a PC keyboard to it, and want to make the Home and End keys work like on a PC (respectively: go at the beginning or at the end of the line), install DoubleCommand, open it from the System Preferences and tick the "PC Style Home and End keys", then click "Activate" and Save for "System". Enjoy.