Turtle controls

Are you familiar with the turtle.onkeypress() function? It basically makes a button on the keyboard call a function. Is there a way you can toggle this on and off? thanks