Hi Bitcould,
I'm somewhat relieved, you could've been one of those militant anti-software patent guys
. Though I'm active in several open source projects, and patents of other companies are a great risk for us. These days, as you say, it is impossible to check that we don't infringe an obscure patent out there.
In general, what you're seeking is what I want to provide: arbitrary devices control arbitrary programs. Joysticks are great, too, and cheap.
There are already programmable keyboards, though they're not very cheap. A user of the preview of Midi Translator Pro uses this keyboard:
http://www.tipro.si/index_products_mid_midkm096a.html
He programs the keys to special codes so that they don't interfere with his standard keyboard and uses MT to translate them to MIDI controllers.
Regards,
Florian