Improving the cursor class to export contextual events