fix keybinding

test for expecting key before toggling the grid