@oliof There are linear hall sensors, but I don't know how sensitive they are. Passing a small magnet along the sensor would act like the rotary mag-sensors, but without the need of a motion translation.