We've covered riskable's work on his void switches, but this one is a totally different approach.
Famichu published these MagLev MX switches, a 3D printable magnetic levitation switch with the linear output Hall effect sensor inside of a Cherry MX compatible housing.
only 2 magnets (5mm diameter x 2mm height) and a Hall sensor (IC A1304).
Dimensions/footprint compatible with Cherry MX switches
Most MagLev switches are not using Hall effect sensors. I think this is because the magnetism is too strong or the distance from the magnet is too close to detect. Therefore I implemented a new method sandwiching the Hall effect sensor between two magnets […] When the axis is pushed, the magnetisms [of the two magnets] will cancel each other out – [thus] the magnetism detected by the Hall effect sensor approaches zero. […] This method made the switch smaller, allowing it to have the same shape as existing switches – famichu.