DwarfKey is a tool for managing macros for the game Dwarf Fortress. Right now it is little more than a codebase, with some minor support for optimizing macros.