Can someone tell me the script for toggling grid snap on and off with a key? Thanks.

 From:  Tigerion
10202.1 

Can someone tell me the script for toggling grid snap (NOT the display of the grid) on and off with a shortcut key? Searched the forums but could not find.

Thanks!