One of my interest areas in grad school is the idea of combinatorial optimization (picking the best answer for an NP-hard problem). The optimum layout of a keyboard falls in this category, since there are on the order of 61! possible layouts for just the main typing area. (61! is roughly 5x10^83)
Examining every single possible layout isn't possible. Even if you were to reduce the problem to only the 26 letter keys, and you tested 1000 layouts every second, it would take you 10,000 trillion years to try them all.
Hence approximation algorithms. Given a way to measure the 'quality' of a layout, these algorithms seek to get very close to an optimum solution, but they can't guarantee that it is _the_ optimum solution (since they haven't looked at every possible one).
This guy has done just that (using simulated annealing):
http://mkweb.bcgsc.ca/carpalx/?For fun, I'm doing roughly the same thing with a different approach (ant colony optimization), but I thought I'd link to his page, because it's very interesting reading. He lists a particular layout that is his best so far (QGMLWY), and provides a download of various mappings.