Search Unity

Question Is there a way to detect ANSI or ISO keyboard layout?

Discussion in 'Input System' started by Foriero, Nov 4, 2021.

  1. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    584
  2. dmytro_at_unity

    dmytro_at_unity

    Unity Technologies

    Joined:
    Feb 12, 2021
    Posts:
    212
  3. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    584
    Thanks, that actually helps a lot. What is the Key ( Code ) of that key in Unity Key. enum ( new Input System ) ?
     
  4. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    584
    On ANSI the first key ( code ) next to the left shift is Key.Z. What is the key ( code ) for <> key on ISO keyboard? Thanks, Marek.
     
  5. dmytro_at_unity

    dmytro_at_unity

    Unity Technologies

    Joined:
    Feb 12, 2021
    Posts:
    212
    I don't have the ISO keyboard right now so can't test. From the docs, at least on Windows, it might be Key.OEM1, not sure how it's mapped on Linux/macOS.

    Would recommend bisecting in ANSI, so if it's Key.Z -> then it's ANSI (likely), if not -> then non-ANSI