Forum Discussion

joetesta's avatar
joetesta
Roku Guru
10 years ago

Detecting Keypress Release

I added a feature to our app to detect "long presses" - when the user is holding down a directional key, the focus keeps moving until the key is released. Problem is that sometimes the roku does not detect that the key has been released and the focus keeps moving indefinitely until the user presses a new key. This seems to happen more with older-style remotes and with roku stick devices. I'm trying to figure out if there's another way to detect that the user is not holding down the key any longer.

Is there a way to detect the current state of the remote (pressed / not pressed) other than listening for key release events?
tyvmia

35 Replies

  • In the code I'm working on now, i'm seeing this happening to me somewhat frequently on Roku 3 & Roku 4 to the point where it's becoming a quality issue. It's like the roku is busy doing something else and doesn't notice the user released the key, and then keeps scrolling forever until the user clicks something else. I wish there was a way to poll the current keystate (hey remote, are you *really* still being pressed?)
  • I rarely have the problem and use keypress logic extensively. What I do notice is more on the stick which I already mentioned and with the ROKU 4 and it's remote, especially when the battery is getting low (which is about every three to four weeks on mine). I stopped using the ROKU 4 remote altogether and took out the batteries. Rule of thumb - never buy the first release of anything. But other than that I have no real issues with keypress release
  • ah thanks! Must be because I'm using the Roku 4 for R&D I'm seeing this more.
  • My Roku stick with wifi remote has the rubber direction/ok pad
  • Here is an alternative theory - maybe it's the component that has the issue, not the remote?

    This is what happened to me today in Roku's Google "Play Movies", so bizarre i figured i'll film it:
    https://www.youtube.com/watch?v=BetjLZ8MXkw

    Basically the "My Movies" grid screen can get stuck infinitely scrolling, which is so weird because it seems to be a regular roGridScreen sub-type. There is no hidden remote. This all happened using the remote held, using left/right arrows made it stuck scrolling and repeat use of the arrows won't un-stuck it. The << / >> stop it but... only temporarily. It is a repeatable bug, not a one-off. WTF...