The code in the sample directory provides lots of comments detailing the steps required to initialize your module, and what to put in your module's functions.
You'll also find two modules:
You'll also find a README file that provides further background info on how the system processes data from keyboard and absolute devices.