Revert "Replace hardcoded key escape sequeneces with dynamic ones from t...

...erminfo."

This reverts commit 174c9177aa34b4c05bb5a1c6f637e6fa479a8e10.
Fixes #2608, #2617.

Without further research, it seems reasonable to keep hardcoded values for now. Using `$terminfo` seems to be inconsistent between different systems.