How can a program automatically detect the keyboard layout?
I am making a computer game (using GameMaker by YoyoGames), and I know that different keyboard types exist, such as QWERTY, AZERTY, QZERTY and others.
I want to make my game in such a way that the keyboard controls will depend on the keyboard type, so that all players can have the controls at the same physical positions, regardless of the letters of the keyboard buttons.
Is there a way, e.g. by using a batch file or whatever, that I can cause my program to return (identify and tell me) the layout of the keyboard?