Added methods to hide and show the cursor