I have a very similar keymap for my Planck.
Check out my userspace for the custom keycodes that are used in keymap.c.
At a very high level I use 4 layers:
make preonic/rev3:mguterl:flash