True. AHK is a Windows program that allows you to use scripting to change the behaviour of input devices and use operating system functions. It manages this by taking advantage of Windows API's. Therefore it is impossible to run AHK on a microcontroller such as Teensy. As csmertx said, the best option you have would be to program it directly into an open source firmware.
I'm pretty sure you need to be a coding ninja to pull this off though. It would be incredible if somebody managed to create a C++ library that can be included in other firmwares and allows you to configure macros via USB that are immediately stored in the controllers memory. You won't get AHK features but it would be great for things like hotkeys and hotstrings. I use AHK for a lot of amazing things ..