I don't know how a controller reports itself to the system, but it probably makes sense to take a balanced approach - if it's possible to sniff an x-box controller then present the appropriate menus; if it's unrecognized then the oldschool List Of Options makes sense - while you can account for a good number of popular variables full coverage just doesn't seem to be economically feasible, especially for small developers.
Keyboards present their own problems - the French, for example, don't use WASD - the keys in those positions are ZQSD (see here). I use a Mac keyboard on my PC - it was easier to just bring it along than to retrain muscle memory for a windows layout. I haven't had issues with games since screenshot functionality was added to Steam (f12). My control/alt/"windows" keys are laid out differently... and I have F13-F15 and no "print screen" key. I'm an edge case on Windows but that's a standard Mac layout, and a variable to account for with multi-system ports.
Oddly, back when I played EVE Online I was able to map drone controls to F13-F15 on the PC... but the Mac port, with a Mac keyboard, didn't see the F13-F15 keys. I haven't tried to map those keys on other games, as the majority of my game time these days is keyboard and mouse with the left hand in the general area of WASD.
The advantage of the keyboard is that the basic shape doesn't change much - the sizing and spacing of the meta keys between Windows an Mac keyboards and localization differences aside it makes sense (to me, anyway) to separate the keycaps from the keys themselves. Localization and the occasional rogue Dvorak layout seem to be the biggest issues. There are a few weird split "hacker" or "ergonomic" designs but I haven't seen one in the wild since around 2003.
If you went with a keyboard graphic for a controls menu I think any design would be acceptable so long as it fits with the rest of the game's UX - I wouldn't expect a representation of a factory-fresh bondi blue Apple USB keyboard in Metro 2033, though a banged-up IBM Model M missing a few keys would fit right in (and could be used to, say... indicate that the Windows key is unmappable - just an empty socket). I like Half-Life 2's implementation - Valve uses a custom font for UI icon display (all the guns/weapons are font characters) - I don't know if their keyboard representation is done the same way but it makes sense that it would be. There are a few basic shapes/sizes for keys and a full board could be assembled with a small number of glyphs/objects.
I think that in a roundabout way we've summarized why consoles are attractive for developers - they're fixed, comparatively slow-moving targets. :)