emulate SHIFT key on Arduino Micro + CD4021BE shiftin register

So, where is the code that reads the switches connected to the shift register? Where is the schematic showing how the switches are connected?