simple cursor mode management