Added a key name generator function.