Kodi Community Forum
EventServer: Analog buttons and repeat delay - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+--- Thread: EventServer: Analog buttons and repeat delay (/showthread.php?tid=64803)



EventServer: Analog buttons and repeat delay - freezy - 2009-12-23

Hi folks,

I'm still working on the XBMC Remote for Android and I'm playing around with some fast scrolling features. The idea would be to have an analog pad which scrolls similar to the "shoot" buttons (official name: left/rightanalogtrigger) of the Xbox gamepad.

Basically I send an EventServer packet each time the user moves his thumb on a scrollbar zone. Now the problem is repeating the keystrokes. If the thumb moves up, the scrolling-up accelerates nicely until the max, then stops 750ms due to the initial repeat delay and continues.

That's obviously only if the button event is set to repeat, otherwise it just stops. Setting the initial repeat to 5ms via HTTP API doesn't help, since this setting seems to be read only on EventServer startup. It needs to be set back anyway, so setting it permanently is not an option.

Any ideas how to solve this problem? The only one that comes into my mind would be sending all keystrokes manually without the repeat settings. Sending a packet manually each 25ms would be silly economic-wise. It's a mobile device with limited battery after all.

Any suggestion?

Cheers,

-freezy.