Most Linux distributions come with the X keyboard extension (XKB) which is part of the X Window System. Fortunately for us the XKB provides a parsable list of all available keyboard models and layouts in /usr/share/X11/xkb/rules/base.xml
. I threw together a Java class that makes use of JAXB to parse this file: