added support for show/hide cursor