You might also want to look into getting a usb encoder like this one:
http://a.co/ejZbkRb
Just wire up your buttons to the board and plug it into one of the usb ports. comes with all the wires even. for $12 it will save you a whole mess of headaches.