Revert "simplify home/end key behavior"

This reverts commit 3bef61232bc2e0e470a66dda6d88248100fdc36f.