I start this project in Processing for a multiTouch sketch. The idea was to make a keyboard map maker in order to make my own distribution of keys for a super configurable tools. So, you can make your owns keyboards or control remotes for any multiTouch/TUIO projects.
Then I migrated to openFrameworks. It still use the same type of config file (one that ends with .kbd) for storing the key distribution. For it, uses polar geometry in order to let it be rotate, scale and drag and continue to be 100% functional.
On openFrameworks uses ofEvents to handles the pressed keys and need the next addons:
You can download the code and examples at: http://code.google.com/p/ofxkeyboard/
[ Note about the .kbd: The first line have the information of the keyboard. Center x and y, the width and height. And the other ones are the keys with their position (on radio and angle), width and height. ]