Pro Trinket menu for Kodi

I am brand new to the Pro Trinket and rotary encoders. I am trying to accomplish what this guy does in this video, see the link below.

I have a raspberry pi that is running Kodi and I am trying to control the menu via the rotary encoder. I purchased the Pro Trinket in hopes that I would be able to connect it to the raspberry pi and the rotary encoder to accomplish this.

I was thinking I could use the keyboard code from this link:

Doesn't seem to work. Please help!

Thanks in advance,