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

Hi, simple question. Is there a way to detect ANSI or ISO keyboard layout?

Thanks, Marek.

Not automatically, and you will need to ask the user to press some keys on the keyboard for this purpose.
For example Apple asks you to press “a key to the right of left shift” as on this screenshot:


( from https://www.addictivetips.com/mac-os/use-a-windows-keyboard-with-a-mac/attachment/macos-identify-keyboard/ )

Thanks, that actually helps a lot. What is the Key ( Code ) of that key in Unity Key. enum ( new Input System ) ?

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.

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