Additions to cursor confinement