add cursor event handlers, refactor custom setter/getter