Hello.
I write a Key Frequency Diagram Generator (sorry my english) in Perl.
You can find it at my homepage.
For example the source code of Perl (3.8 Mb, written in C++ language):
(The result html is designed to Firefox)
Portable Keyboard Layout with Colemak support
http://pkl.sourceforge.net/