Ah, ok. What platforms do you need? I know how to do it with linux, os x, and windows, but not any of the more fringe platforms.
If you want it stored in the keyboard itself, the only way I know of to do that is by a controller swap, and a teensy replacement. And you'll have to add non-volatile storage to the teensy, to store the macros, as well. Unless you hard code them, of course.