Here is a patch for keyblock.setName(). There is also an example script to show a use for it :) https://projects.blender.org/tracker/index.php?func=detail&aid=3157&group_id=9&atid=127