Implement mouse emulation