Ok, so I've implemented toggle-able function layers now. I currently have 7 layers implemented (it should be fairly easy to add more) by pressing FN + 0-6, unfortunately, the way I programmed it lets you only map one function key.
I haven't really ever contributed anything source-wise before, so I'll just post my source here, and hopefully it shouldn't be too hard to get it incorporated into the main repository. I'm pretty sure the only files I modified were phantom.c, phantom.h, and teensy_keyboard.c.
Some notes:
Everything that needs to be configured is located in phantom.c. The function key, as well as the keys needed to change layers are referenced by switch position (E.g. SW4_9 is switch where '0)' usually is). Mapping the layers is the same as previously, except that there is a layout array for each layer. Currently all of the layouts are the same ansiwin layout.
Umm. Enjoy! (Now somebody get media keys working
)
EDIT: Also, if you want to have hold-function-key-to-switch-to-other-layer functionality, you can uncomment the other send() function in teensy_keyboard.c.
EDIT2: I've also found another problem with my function code. All layers use the same is_modifier array, so any key that is a modifier must remain a modifier (no switching caps_lock and control via layers). I'll see if I can find a graceful way of dealing with this.