Add an interrupt-based triggering mode as an alternative to polling.
The current implementation only supports polling mode, where button GPIO levels are sampled on a periodic timer. This works but is less responsive and efficient than interrupt-driven detection.
Proposal:
- Register a GPIO ISR handler for the button pin.
- On interrupt, disable further interrupts for that pin and start a one-shot debounce timer.
- When the debounce timer fires, read the stable GPIO level and proceed with normal press/release/autorepeat/long-press handling via the existing polling timer.
- Re-enable the GPIO interrupt on button release.
This allows buttons to trigger immediately, and be idle with zero CPU overhead until actually pressed, while still using the proven polling logic for timing-dependent features like autorepeat and long press.