Implement mouse grab mechanics