Add cursor_wrapped callback for fine-grained control