Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Feedback Button.onClick() behaviour from keyboard slightly strange?

Discussion in 'UGUI & TextMesh Pro' started by Kody, Jan 4, 2021.

  1. Kody


    Dec 4, 2012
    UI.Button's onClick() method is called when releasing the mouse button after clicking on the UI.Button. This is fine and what I expect.

    However when I use keyboard navigation, and presumably gamepad though I haven't tried it yet, it triggers when the key is first pressed down, not when it's released. There's obviously nothing inherently wrong with this but it feels inconsistent when compared to the mouse interaction.

    It would be nice if these were more consistent. Or at least if the keyboard one (and maybe also one for the mouse, my googling the issue to see what people have to say about it lead to a lot of people wanting the mouse interaction to work the opposite to how it does) had a toggle for whether to activate On[UIConfirm]Down vs On[UIConfirm]Up.