The Application of 3-Switch Hall-Effect Sensors in Keyboard Keys: From « Key » to « Joystick »

  1. Accueil
  2. Actualités
  3. Briefs techniques
  4. The Application of 3-Switch Hall-Effect Sensors in Keyboard Keys: From « Key » to « Joystick »

3-Switch Hall-effect sensors transform keyboard keys from simple « one-dimensional switches » into « three-dimensional input devices. » While traditional magnetic-switch keyboards utilize single-switch (1D) Hall-effect sensors—which only detect the depth of a keypress (the Z-switch)—3-switch Hall-effect sensors perceive magnetic field components across the X, Y, and Z axes simultaneously. This means a single key can detect not only « how deep it is pressed » but also « in which direction it is pushed. » By designing keys with a tiltable or wobble-capable structure, 3-switch Hall-effect sensors can turn them into miniature joysticks, enabling 360-degree directional detection and variable pressure sensitivity—effectively integrating the continuous control capabilities of an analog joystick into a standard keyboard layout.


 

I. From One Dimension to Three: A Fundamental Leap in Detection Capability

In traditional magnetic-switch keyboards, a Hall-effect sensor focuses on only one variable: the proximity of a magnet. As a key is pressed, the magnet moves closer, altering the magnetic flux along the Z-switch; the keyboard’s microcontroller then uses this data to calculate the travel distance. In this process, the magnetic field components along the X and Y axes are ignored—or, more accurately, they remain entirely « invisible » to a single-switch sensor.

A 3-switch Hall-effect sensor integrates three mutually perpendicular Hall elements, each detecting magnetic field intensity along the X, Y, and Z axes. A single 3-switch sensor can replace a configuration that would otherwise require multiple single-switch sensors, saving PCB space and facilitating the development of more compact, multifunctional keyboards.

More importantly, a 3-switch sensor outputs not just the « strength » of the magnetic field, but its « orientation. » As the magnet’s orientation or position shifts within 3D space, the proportional relationship between the three components changes. By calculating the ratios of these components (for instance, using the arctangent of the Y and Z components), the microcontroller can determine the magnet’s angle or offset direction relative to the sensor.

 

II. Transforming Keys into Joysticks: The Role of Structural Design

The sensor alone does not turn a key into a joystick; the structural design is the critical factor. To endow a key with « joystick » functionality, its stem or base must allow for a certain degree of tilting or wobbling.

Patent literature describes a « 3D magnetic-switch key » design: during a standard keypress, the magnet moves vertically along the Z-switch enabling conventional actuation and Rapid Trigger (RT) functions. When a user requires joystick-like control, they can tilt or nudge the key around a pivot point, causing the magnet to shift within the X/Y plane. A 3-switch Hall-effect sensor captures these displacements and outputs corresponding analog signals, which the main controller then maps to joystick-style axial inputs. A reset mechanism returns the key to its center position once released, allowing for repeatable, multi-directional input.

The open-source project « Keybytes » offers a more direct proof of concept: its Hall-effect-based circuit board utilizes a TMAG3001 3-switch Hall sensor. By pairing this same board with different mechanical structures, it can function as a Hall-effect key, a rotary knob, or even a miniature joystick. This demonstrates that a 3-switch  is determined primarily by how the mechanical structure guides the magnet’s movement.

 

III. Practical Value: What Problems Do « Analog Joysticks » on Keyboards Solve?

Keyboard keys are inherently discrete—they are either pressed or released, on or off. Even with the introduction of adjustable actuation and Rapid Trigger (RT) in magnetic switches, the operation remains confined to a single linear dimension. Joysticks, by contrast, offer continuous directional input and variable intensity—capabilities essential for racing games (linear throttle/steering control), flight simulators (control surface manipulation), and certain AAA titles that require analog-style movement—all of which are otherwise impossible with standard keyboard keys.

Integrating joystick functionality into a keyboard layout eliminates the need for users to switch between a keyboard and a game controller. A 3-switch Hall-effect sensor enables a single key to transition seamlessly between « standard typing » and « joystick operation. » Furthermore, application documentation from Texas Instruments notes that 3D Hall sensors can be used in keyboards to detect both the rotational angle of a knob and downward press actions, effectively expanding the input dimensions of the keyboard. It should be noted that this « key-as-joystick » approach is still in its early stages. While patents and open-source projects have demonstrated technical feasibility, keyboards that actually incorporate three-switch Hall-effect sensors to provide joystick-like functionality in mass-produced products remain rare. Keybytes itself is essentially a « proof-of-concept » project. The engineering challenge lies not in the sensors themselves, but in the mechanical design: creating a key structure that can withstand the rigors of daily typing while also offering reliable tilting or rocking motion when needed—all while ensuring precise centering and long-term durability.

 

IV. Relationship with Single-switch Magnetic Switches: Complementary, Not Substitutive

Three-switch Hall-effect sensors will not replace single-switch sensors in standard keys. For the vast majority of keys, users only need to know « how deep a key is pressed, » for which Z-switch data is entirely sufficient. Single-switch sensors are more cost-effective, require simpler firmware processing, and offer better control over power consumption.

The value of three-switch sensors lies in the possibilities they unlock beyond traditional key actuation—such as a purpose-built « joystick key, » a tiltable knob, or an auxiliary control module integrated into the edge of a keyboard. They expand the keyboard’s input language from « discrete characters » to « continuous direction and force, » eliminating the need to carry a separate game controller or joystick. For users who prefer a streamlined, all-in-one desktop setup, or those who frequently switch between keyboard/mouse and game controllers, this represents an engineering direction worth watching.

MelGeek MADE90: A 97-Key Productivity Keyboard Featuring Physical Controls for « AI Workflows »
Circuit Switching and Hot-Swapping Safety Design for Wireless Mice with Replaceable Batteries
Menu