pinch zoom with trackball

related: https://gall.dcinside.com/mini/board/view/?id=splitkeeb&no=8784&page=1

If I can do pinch zoom with trackball, the keyball-like keyboard is nearly perfect for me

Research (how to make a trackball driver to send pinch zoom gesture)

as of 2025-10, both qmk and zmk doesn't support multi-touch. though qmk does have a experimental patch to do that: https://github.com/george-norton/qmk_firmware/compare/multitouch_experiment...ploopyco:qmk_firmware:multitouch_experiment

zmk is using zephyr which doesn't support multi-touch yet.

How zmk drivers work

iiuc there are two protocols to communicate with the host:

  • spi

  • i2c

paw3222 is using spi.

also, I can define an API to communicate with host: https://github.com/ozkan/azoteq-input-module/blob/b6e1b4f7bf3f85a9b7910234b893c37ad47a2a9a/drivers/sensor/tps65.c#L569-L574

but I couldn't actually find how this is used. maybe from zmk's fork of zephyr?

input processor?

doc

like &zip_xy_to_scroll_mapper, if I can define a custom transformer there, it would be way easier as I can just skip the communication part.

wait is this repo doing same thing?

https://github.com/halfdane/zmk-input-gestures?tab=readme-ov-file#configure-some-gestures-and-add-them

ohhh it is just emulating the mouse interactionn, but there is zmk_hid_mouse_movement_update in <zmk/hid.h>. if I need to emulate the trackpad, I can implement in similar way

plan

  1. learn how trackpad work from qmk's implmentation

  • how they communicate (is it same to other sensors? or does host do some kind of polling to get multiple data?)

  • how they send multiple touch inputs

  1. implement that functionality with zephyr

Other solutions

the second one is actually semi-complete. I cannot use it rn because it doesn't support 'zoom in/out' behavior on 'click and scroll' for mouse button 3 (the middle button)

Other useful links