To hit the ball press the space bar but don't hold it, you have to release the space bar before the ball gets to you. The bar at the bottom will start flashing hit the space bar again to stop it from flashing and hit the ball.
This only took 2 days, it was actually quite difficult but I got over the bugs quickly and this really was just a bit of fun, BTW: I love cricket.