Hi there. I ever wondered how to completely build my own mini keyboard like this :

One day i found circuit created only with electronic logical gates (like AND, NAND and so on), which was used to obtain information about pressed buttons and transmitted it into the console (yeah, it was for PS). But now i want to build my own USB device for PC, but i dont have any idea, where I should start searching. So I'm here to ask you for advice.
Something about that: It will be 12-16 button device, connected to PC over USB and some software to assign any key or macro to every button.
So thats it and now comes your part. Can you help me with it?
