I made this as part of a software suite I am using to facilitate use of Minecraft by young children. I found when the three year old plays, he's constantly asking me to do things for him. A bit irritating when it's a request every 5-10 seconds lol. So I made a strip in Photoshop to assign functions to all of the F keys, things they typically ask for. Then I used AutoHotKey to capture the F keys and have it send commands to this Minecraft plugin. I also wrote a C# program that can interdict keystrokes - this is to keep them from hitting the Windows key or ALT-TAB'ing and freaking out when they aren't in the game anymore lol. If you are interested in this stuff, these are the files:
AutoHotKey
AutoHotKey Macro File
Keyboard toolstrip paper template
KeyHostages (key interdictor)
KeyHostages config preloaded to block Win/Alt in Minecraft
See the documentation tab on how to configure this. I've left a default config from when the kids were playing as an example you can work from to see the layout. The items and spawngroups can be deleted if you don't need them.
PS - I made a batch file to simplify firing all this up:
Code (Text):
@echo off
if "%1"=="" goto :help
d:
cd\games\Minecraft
tasklist|find "autohotkey" /i>nul
if errorlevel 1 start MinecraftMacros.ahk
cd KeyHostages
tasklist|find "keyhostages" /i>nul
if errorlevel 0 taskkill /im keyhostage* /f>nul
start KeyHostages /t Minecraft /go
cd..\_MultiMC
start multimc.exe -l %1
goto :eof
:help
echo Pass the version!
This would, of course, need to be tweaked for your setup but you can get a general idea by looking at it.