Revert "Revert "use new style xterm events""
Revert "Revert "use new style xterm events""

This reverts commit 6a969d2cd22f1c4eab823fa976c9ff2694fef3dd.

Eugeny/terminus,Eugeny/terminus,Eugeny/terminus,Eugeny/terminus,Eugeny/terminus,Eugeny/terminus