This is my first time working with HKI and HKP files so there might be mistakes in my assumptions.
That being said, the file format shown below definitely is correct.
Please place a comment below if you find any issues regarding these notes.
This gist shows the hotkeys that are present per hotkey file.
For more info about the hkp file structure, see my other gist.