Search Unity

[Solved] Sticky Keyboard Navigation Controls

Discussion in 'Unity UI (uGUI) & TextMesh Pro' started by Saruto, Aug 24, 2014.

  1. Saruto

    Saruto

    Joined:
    Aug 24, 2014
    Posts:
    4
    Has this been a problem for anybody else? To specify, look at this sample project:
    sticky.png

    Pressing one direction multiple times feels fine; there are no problems starting at the bottom button and press the up arrow repeatedly. However, the problem arises when you quickly switch between different directions. For example, if you push the up arrow 3 times, then push the down arrow 3 times, you'll notice that there is a fraction of a second delay time when you switch directions. Usually, this will result in a keypress getting completely ignored.

    It's even worse when you press the up and down arrows in a moderately quick succession; almost none of your inputs get read, and the highlight button ends up not changing at all!

    The result is a 'sticky' feeling UI, where player inputs can be completely ignored. I tried changing the Input Actions Per Second parameter in the Standalone Input Module component, but the delay between keyboard inputs remains unchanged.

    Am I missing something here? This feels like a pretty serious UI flaw.
     
  2. Senshi

    Senshi

    Joined:
    Oct 3, 2010
    Posts:
    524
    Try setting the Input Actions Per Second to something higher than 10; I'm guessing that's causing the issue (which would be neigh-on unnoticable going in the same direction repeatedly)?

    EDIT: I was being a (sleepy) idiot. I completely missed that, my apologies!
     
    Last edited: Aug 24, 2014
  3. Saruto

    Saruto

    Joined:
    Aug 24, 2014
    Posts:
    4
    I said I already tried that with a variety of different numbers; the delay never went away on any of those tests.

    In fact, it didn't even get mitigated at all, which makes me think that the Input Actions per Second is completely independent from this problem.
     
  4. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,087
    Hi, in the input manager play with the gravity for the vertical / horizontal axis as it attempts to simulate analogue input.
     
    Saruto likes this.
  5. Saruto

    Saruto

    Joined:
    Aug 24, 2014
    Posts:
    4
    Oh, wow! You're exactly right; changing the gravity to a much higher number completely gets rid of the delay.

    Thank you so much, Tim! :)
     
  6. vexe

    vexe

    Joined:
    May 18, 2013
    Posts:
    623
    I'm having a similar issue. Except it only takes me to press DOWN + LEFT (or RIGHT) quickly, Selection goes DOWN twice and not DOWN then LEFT (or RIGHT). I tried messing with the values in the event system, and the gravity/sensitivity in the InputManager, no dice. Any idea?