CLDR (Unicode Common Locale Data Repository) has compiled a set of descriptions of keyboard layouts in XML format. The data comes from various sources and is under public review, but it is neither exhaustive nor authoritative – though probably the best you can get at present.
You might wish to compare the information with data at http://en.wikipedia.org/wiki/Keyboard_layout which is more limited and not authoritative at all, but tends to focus on commonly used physical keyboard and their layouts (and standards for keyboards) rather than the variation across systems and devices.