Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Ranjitha_8s
Binge Watcher

How continuous button press can handle?

I have a row list and when I press the right button (keep pressing) it starts scrolling continuously. How can I catch the event? I need to start a timer when it starts to scroll and need to stop it when the button is released.

0 Kudos
3 REPLIES 3
renojim
Community Streaming Expert

Re: How continuous button press can handle?

I looked into this briefly recently and didn't see any events fired until the scrolling stops.  I didn't spend much time on it because I didn't really need it at the time.  If you find out something, or if anyone else knows, it may be helpful to know for the future.

Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
Ranjitha_8s
Binge Watcher

Re: How continuous button press can handle?

Currently, what I did was, there is a field in the row list "SrollingStatus". This field is set to true when we press the key and false when we release the key.

I observed this field and whenever it is set to true and false my callback function will call. So, inside the callback function, if we press the key and not releasing the state would be true. At that time, we can start a timer, and, in the meantime, the field is not set to false (key release will set the field to false), we can assume this is a continuous key press(scrolling).

This is the only solution I got as of now. Please correct me if I am wrong. Thank You.

0 Kudos
renojim
Community Streaming Expert

Re: How continuous button press can handle?

That looks good!  Thanks for sharing.

Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.