<p>How can I find out, which keyboard layout the user of my ruby application is using?
My aim is to have a game, where you can move the player on a map. To go one step down and one step left you press "Y" on a german keyboard. On an American keyboard, you would press "Z". We optimized the game for windows and mac, so I would like a solution for both platforms (and we don't use any command/shift/control-keys).</p>

For Windows, you probably have to use the
Windows API GetKeyboardLayout()
, unless Ruby provides a wrapper for that.
There are a lot of
useful I18n resources for Windows on the MSDN web site
.
It might be easier to simply allow them to configure it themselves as a preference if you don't have a good portable way of detecting it.