Separated inserting code for comp and seq events.
Fixed a bug in handling seq events.
Back to using cbreak instead of raw.
Fixed seq events handling.
Added seq events to test in main.