What Is Magnetic Keyboard?
Magnetic keyboard uses permanent magnets and magnetic sensors to detect the movement of individual keys. Unlike conventional mechanical switches that rely on electrical contacts to register a keystroke, magnetic switches can continuously measure the position of the moving key stem.
In a typical Hall effect keyboard switch, a small permanent magnet moves together with the stem while a Hall sensor remains fixed below the switch on the PCB.
Pressing the key changes the distance between the magnet and the sensor, which changes the magnetic field detected by the sensor. The keyboard controller converts this changing signal into key-travel information.
The spring still provides the mechanical return force, while the magnet mainly serves as the sensing target. Because the system can determine key position throughout the travel rather than only detecting an on/off contact state, magnetic keyboard can support adjustable actuation points, rapid trigger, and other travel-dependent functions.

How Key Travel Becomes a Magnetic Signal?
Key travel is not measured directly in a magnetic keyboard. The sensor measures the magnetic field produced by the moving magnet, while the controller uses the sensor output to estimate the position of the key.
As the stem moves downward, the magnet approaches the sensor and the magnetic flux density detected at the sensing position increases. In a typical axial arrangement, a smaller gap produces a higher flux density at the sensor. However, magnetic flux density does not change linearly with distance.

This nonlinear relationship means that the same amount of key movement does not necessarily produce the same change in magnetic signal throughout the full travel. The controller therefore relies on calibration and signal processing to translate sensor output into corresponding key positions.
Once key position can be tracked continuously, software can define adjustable actuation points and rapid trigger behavior without relying on a fixed mechanical contact point.
Hall Effect vs TMR Sensors in Magnetic Keyboard
Hall effect sensors are still the most common sensing technology used in magnetic keyboards. They detect changes in magnetic flux density through the Hall effect and convert the magnetic signal produced by the moving switch magnet into an electrical signal. The technology is mature, compact, and well suited to continuous key-position sensing.
TMR sensors use a different principle. Instead of generating a Hall voltage, they detect changes in electrical resistance in response to an applied magnetic field. TMR sensors can offer higher magnetic sensitivity, lower power consumption, and better signal resolution, which is why they are increasingly being introduced into newer magnetic keyboard designs.
Higher sensitivity does not automatically mean better keyboard performance. The useful sensing range still depends on how the magnet, air gap, sensor range, and switch travel are matched. Too little change in magnetic flux density across the travel provides limited usable signal, while excessive flux density at the sensor may fall outside its optimal operating range.
Other magnetoresistive technologies, including AMR and GMR, are also used in magnetic position sensing. For magnetic keyboards, however, Hall effect and TMR sensors are currently the most relevant technologies because both are already being used for continuous key-travel detection.
Magnetic Keyboard vs Mechanical Keyboard
The fundamental difference between magnetic keyboard and conventional mechanical keyboard lies in how key movement is detected. Mechanical switches typically register a keystroke when electrical contacts reach a defined switching point, while magnetic switches use a moving magnet and a magnetic sensor to continuously track key position.
| Feature | Magnetic Keyboard | Mechanical Keyboard |
|---|---|---|
| Sensing principle | Magnet + Hall or TMR sensor | Physical electrical contacts |
| Key position | Continuously measurable | Primarily on/off state |
| Actuation point | Software adjustable | Mainly determined by switch design |
| Rapid trigger | Supported through continuous position tracking | Generally unavailable with conventional contact switches |
| Contact wear | No sensing contact between magnet and sensor | Electrical contacts are part of the switching mechanism |
| Calibration | Often required for accurate position mapping | Usually not required for basic switching |
This continuous position information is the main reason magnetic keyboards can offer adjustable actuation and rapid trigger behavior. The advantage does not come from magnetism making the switch mechanically faster; it comes from replacing a fixed switching event with continuously measured key travel.
Mechanical switches still have their own advantages, including mature designs, broad switch variety, and simpler sensing requirements. Magnetic keyboard therefore represents a different sensing architecture rather than a universal replacement for mechanical keyboard.
Magnets Used in Magnetic Keyboard Switches
Magnetic keyboard switches typically use small permanent magnets integrated into the moving stem. Many current designs use compact rare earth permanent magnets, with Neodymium (NdFeB) magnets explicitly used in some Gateron switches.
The magnet is oriented so that one magnetic pole faces the PCB sensor. As the stem moves, the changing distance between the magnet and sensor produces a corresponding change in magnetic flux density at the sensing position.
Magnet polarity is also part of the switch design. Some magnetic switches use the north pole facing the PCB, while others use the south pole. A switch with reversed polarity may therefore be incompatible with a keyboard designed for the opposite magnetic orientation, even when the mechanical dimensions appear similar.
Unlike applications where maximum holding force is the main objective, the magnet in a magnetic keyboard does not simply need to be as strong as possible. Its magnetic output, position, and working distance must produce a suitable field range across the complete key travel. Current switch manufacturers even specify initial and bottom-out magnetic flux values, which shows that a controlled magnetic response across the travel is more important than maximum surface field alone.
What Determines Magnetic Sensing Accuracy?
Magnetic sensing accuracy depends on the complete magnet–sensor system rather than the sensor specification alone. The magnetic field detected at each key position is influenced by magnet strength, magnet dimensions, magnet position inside the stem, sensor location, and the working gap between them.
Consistency is especially important because a keyboard repeats the same sensing structure across dozens of keys. Variations in magnetic output or magnet placement can shift the field–distance curve from one switch to another. Mechanical tolerances in the stem and housing can also change the actual magnet–sensor distance or introduce lateral offset during key travel.
Sensor selection adds another constraint. Hall effect and TMR sensors have defined sensitivity and operating ranges, so the magnetic field should remain within a useful range throughout the full key travel. Too little field variation reduces the available sensing signal, while an excessively strong field may fall outside the sensor’s optimal operating range.
Calibration can compensate for part of these variations by mapping the measured sensor output to actual key positions. However, calibration does not eliminate the value of consistent magnets and controlled assembly. Better magnetic and mechanical consistency reduces the amount of correction required and helps different keys produce more repeatable position signals.
Where Else Is Magnetic Position Sensing Used?
Magnetic keyboard is one example of a broader shift toward compact, contactless position sensing. The same basic concept—combining a permanent magnet with a Hall effect or magnetoresistive sensor—can be adapted to detect linear movement, rotation, or angular position in many newer electronic systems.
Gaming controllers are one of the closest examples. TMR and Hall effect joysticks use moving magnets to determine stick position without relying on traditional potentiometer contacts, while magnetic analog triggers measure trigger travel in a way that is conceptually similar to key travel in a magnetic keyboard.

Similar magnetic sensing is also appearing in other gaming and interactive controls, including mouse wheels, driving wheels, pedals, and AR/VR devices. The motion may be linear or rotational rather than identical to a keyboard switch, but the basic principle remains the same: relative movement between a permanent magnet and a magnetic sensor is converted into position information.
Discuss Magnetic Components for Position-Sensing Applications
SDM supplies small Neodymium magnets for compact magnetic sensing and positioning systems. If your project involves specific magnet dimensions, magnetic performance, polarity, or assembly requirements, contact us to discuss the application.






