cursor hide, duplicate key prevention