Toggle magnetism with f and g

f for on, g for off