a better way to unregister pressed keys