Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Question Detect Backspace Key Press on Touchscreen Keyboard With TMP_InputField

Discussion in 'UGUI & TextMesh Pro' started by MehmetFatihGezen, May 6, 2024.

  1. MehmetFatihGezen

    MehmetFatihGezen

    Joined:
    Jun 15, 2022
    Posts:
    4
    Hello,
    I’m developing a verification-code like submission screen for my mobile project. I have 4 TMPro_InputFields side-by-side and when you enter a number to one of them is gets the value and activates next input field. Same applies in reverse when deleting a number from one of them.

    The problem is; If someone presses Backspace key on their touch keyboard and meanwhile text of InputField is empty, I can not get any event. I must activate previous InputField in that case. Since text value remains same, OnValueChanged is not triggered. I tried many combinations (like Input.GetKeyDown at Update) but none of them worked with Touch Screen Keyboard. Can you help me?