Would love to take credit for it lol
I loaded up the layout template "BlackAndGreenWithButtons.tlo" and used the existing code. It is very handy for the common functions, saves having to look up the keyboard shortcuts. Once you have a look at how its done you can add other buttons and stuff (tokens).
Really happy to help you dude, so if you have any problems let me know, then I will post the code and explain how to use it for you. I just thought it might be easier to load up the template to start off with.
Hope this helps ya out.