What is Wooting keyboard? You can watch this video introduction: [https://www.bilibili.com/video/BV1kG4y1U7Xm](https://www.bilibili.com/video/BV1kG4y1U7Xm)
Simply put, it is in the mechanical axis body The ordinary mechanical keyboard is turned into a Hall keyboard by inserting magnets, so that the travel data of each key can be obtained.
The easiest application to think of is that the keyboard can change the trigger stroke. But can more be done? Wooting has taught a lesson to the majority of audio game players, it directly changed the button triggering logic.
The normal keyboard triggers the key when it exceeds the stroke and disconnects when it is below the stroke. Wooting was changed to trigger when pressing down and disconnect when it is released upward. Intuitively, this operation saves the time required to reach the trigger stroke, and it seems that the input delay is greatly reduced. Of course, the fingers are also better at shaking out high bpm.
![bili_v_1678626765768.gif]

In theory, any analog input axis (currently mainly a magnetic axis, optical axis, capacitive axis) can do this, but obviously the magnetic axis has the highest accuracy. Unfortunately, domestic magnetic axes are not easy to obtain. This article I used Amilo capacitive switches (Sakura Pink 45g) to make a 4k small audio gaming keyboard, which can achieve about 70% of the wooting keyboard effect.
Principle: The samd21 series microcontroller has an on-chip capacitive touch pin (10bit ADC), which can directly read the shaft capacitance value. The measured signal-to-noise ratio is okay, but it is far from the 14bit+ of the magnetic shaft. Note that this solution is also compatible with ordinary mechanical shafts, but it cannot achieve rapid triggering effects.
The current trigger algorithm: Use a ringbuffer to maintain the recent capacitance value, calculate the difference and then determine the trigger based on the number of rises or falls. At the same time, in order to avoid extreme situations, upper and lower dead zones are set, and the trigger or release must be triggered within the dead zone. Please test the initial dead zone capacitance value yourself. The differences in different environments are quite large.
Necessary materials:
circuit board x1 (thickness can range from 1.2mm to 1.6mm)
positioning plate x1 (the positioning plate is also made of fr4 circuit board, pay attention to the thickness of 1.2mm)
m3 10mm screws x4
m3 nuts x8
m3 1mm high spacers x8 ( Two washers + 1 nut are just enough for the gap between the positioning board and the circuit board)
capacitor shaft body and keycap x4 (the disassembly shaft I got at Xianyu)
seeeduino xiao microcontroller
shaft seat x4
optional materials:
at24cxx storage ( Used to store custom configurations, available for secondary development)
ws2812b 3528 reverse sticker x4 (for lighting effects)
6x6 touch buttons (for other function buttons)
4.7k 0805 resistor x3 (for i2c pull-up and function keys) Pull, if not used, you don’t need it)
4.7k 0805 resistor x4 (used as a pull-down resistor when connecting to an ordinary mechanical shaft. If you only use a capacitor shaft, it can be covered with a tin cover).
The most geeky version only needs to weld the microcontroller + axis seat + 4 jumpers, 26 solder joints in total.
Code: https://github.com/MaticsL/cap4k
Video demonstration:
[https://www.bilibili.com/video/BV1Cs4y1s758/](https://www.bilibili.com/video/BV1Cs4y1s758/)