title: library with keyboard layouts
body: <p>For my daughter (11 months old) I'm currently developing a program that entertains her while she is typing (well, more of smashing it) on the keyboard of my laptop.
  It works really nice already and as she and her nephew (same age) seem to like it, I thought that maybe other children might as well.</p>
  
  <p>The problem I now got is the following: when a key is pressed, something is drawn on the screen. The location where the picture is drawn depends on the physical location of the key on the keyboard. So for that I need to know the layout of the connected keyboard. Currently I'm using hardcoded en_US layout but maybe some day an e.g. French kid wants to use it.</p>
  
  <p>On linux I can find the locale using the LANG environment variable and I think I may be able to retrieve the layout from some undocumented file underneath the xorg/x11 files. But I'm looking for a more portable version which works between distributions but also on microsoft windows and maybe even macos x.</p>
  
  <p>I googled for it of course but could not find anything. So does anyone know of a solution in C/C++? If it is full of #ifdef-statements to work on multiple platforms then that is not a problem.</p>
  
  <p><a href="http://www.vanheusden.com/kids/" rel="nofollow">the program this is all about</a></p>