The issue you're running into is classic noise floor detection becuase wood desks are great for resonance. If you're getting false triggers from typing, the problem isn't just the sensitivity threshold; it's that the ambient noise profile overlaps with your tap signature. Instead of just trying to adjust the raw sensitivity of the accelerometer, try applying a low-pass filter to the data stream before it hits your decision logic. A simple digital low-pass filter can significantly smooth out those tiny, high-frequency vibrations caused by keyboard clicks or footsteps, letting only the heavier, slower motion of a deliberate tap through to the processing stage. If you're using an MPU6050, you can implement a basic complementary filter, which actually mixes the accelerometer and gyroscope data. The accelerometer is good for hard shoves, but the gyroscope provides consistent data even during momentary impacts, which can help stabilize the readings and make the recognition much more reliable than using just one axis. Regarding the debounce time, it's not just about preventing one tap from registering as two. You should implement a time window check. For instance, after a successful trigger detection, hold the system in a cooldown state for about 500 milliseconds. This prevents the system from reacting to residual vibrations caused by the initial tap's impact. If you see multiple triggers within that 500ms window, you know they are likely just aftershocks of the first event rather than a distinct double tap. For the advanced filtering you mentioned, a Kalman filter is definitly overkill unless you are trying to acheive military-grade precision, but the math behind it helps isolate true movement by predicting where the sensor should be and comparing that prediction to the actual input. If your ESP32 has enought processing power, that method should drastically cut down on the false positives you are seeing.