remove duplicate stdout.flush()
add mouse tracking support as a context manager.
complete mouse tracking extended modes

the default mode is a comprimise of the most compatible and most capable and documented well.