If the game freezes, just click inside it (games can get unresponsive if you click elsewhere on the page).
The object of the game is for Mario to mix and match the cookies. The player controls a cursor which can be used to slide rows of a single "square" of individual cookies in a method similar to a Rubik's Cube.
ASZXDC + enter and right-shift.
D and C are for the side buttons.