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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Spanish Ñ for:::: Input.GetKeyUp(KeyCode.A)

Discussion in 'Editor & General Support' started by gegagome, Mar 8, 2013.

  1. gegagome

    gegagome

    Joined:
    Oct 11, 2012
    Posts:
    389
    Hello

    Does anyone know how to do this condition:

    Input.GetKeyUp(KeyCode.A)

    But with support for Spanish Ñ?

    I'm enabling keyboard input for computers and I'm stuck with this character

    The (Mac) support page for Unity: file:///Applications/Unity/Documentation/ScriptReference/KeyCode.html doesn't include this character nor other non-English ones.


    Any help would be appreciated

    Thanks
     
  2. gegagome

    gegagome

    Joined:
    Oct 11, 2012
    Posts:
    389
    I think I solved this issue

    The semicolon is the KeyCode for Ñ.

    It seems Spanish keyboards key codes are translated based on the original English configuration.
     
    Last edited: Mar 17, 2013
  3. careuno1

    careuno1

    Joined:
    Jun 10, 2015
    Posts:
    8
    thank you very much, i've been looking for this issue.

    Is there a possibility to config my game for Spanish keyboard? I need it
     
  4. Josefofefa

    Josefofefa

    Joined:
    Apr 14, 2016
    Posts:
    1
    You can write this

    void OnGUI()
    {
    Event e = Event.current;
    if (e.isKey)
    Debug.Log("Detected key code: " + e.keyCode);

    }

    to see which key is pressed the console. If you press the key "Ñ" it shows BackQuote in my keyboard, then just write this

    void Update () {
    if (Input.GetKey(KeyCode.BackQuote))
    {
    Debug.Log("Ñ");
    }
    }

    I have tried what gegagoge has written but in my keyboard it is "`".