emulation: Fix escape sequences of keypad Home and End (take 2)

https://bugzilla.gnome.org/show_bug.cgi?id=600659#c63
(cherry picked from commit 691669ac5166da1104eb584bc43a70a9c7a924d7)