Added capture of cursor

Closes https://github.com/PistonDevelopers/piston-examples/issues/11