Combine ESC O with ESC [ and allow ESC [ [ along with
any ESC X where X as any character.

Encoded, rather than while parsed, ESC O sequences
are converted to ESC [ sequences.

Additionally the marco use for defining key stroke
values are simplified for a reading point of view.

These changes are purely in preparation for Cygwin
input escape sequences support, so that Cygwin support
does not make the code overly complex.

Finally the encoded escape sequences argument are
shifted 7 bits instead of 8 bits because the 8:th
bit in the final character is always off.

Similarly the first encoded character, for non-CSI
sequences are added to the 8 highest bits in the
encoding. Because the highest bit is always of in
the character it does not matter that the highest
bit in the character intersects with the set bit
(1 << 31).