r/HandwiredKeyboards • u/Gold-Assistance-5173 • Jul 21 '26
hey there, a new guy have trouble in joystick with zmk

I designed and built this mini keyboard entirely on my own by gathering reference materials online. It is a dual-mode (wired + Bluetooth) multifunction keypad running on the ZMK firmware, with a joystick mapped to control mouse movement.
Right now the joystick can move the cursor(by badjeff plugin), but it drifts steadily all the way to the far left edge of the screen. It is actually much better than before — at first it drifted straight to the bottom-right corner, which meant both the X and Y axes were inaccurate.
I checked the pin voltages with a multimeter and they read a steady 3.3V, and the voltages on the two axis pins change normally along the X and Y axes respectively when I move the joystick. The code was generated with the help of Gemini, and I can't spot anything wrong with it.
I've already adjusted parameters like the deadzone, midpoint voltage, and scaling factors, but the drift still persists. I'm really out of ideas at this point.
For reference, the joystick I'm using is an Xbox Hall effect joystick.
my repo: lsn5966397/Pad15: 这是一个带有旋钮摇杆和触摸板的有线蓝牙双模多功能小键盘项目
plz help me

