hi @anon57585045
you asked for schematic and code wel here it is 
74HC165 Shift Register Demonstration 1
74hc165-demo.ino
Read from 8 switches and display values on serial monitor
DroneBot Workshop 2020
https://dronebotworkshop.com
*/
// Define Connections to 74HC165
// PL pin 1
int load = 7;
// CE pin 15
int clockEnablePin = 4;
// Q7 pin 7 //
int dataIn = 5;
// CP pin 2
int clockIn = 6;
void setup()
{
// Setup Serial Monitor
Serial.begin(9600);
// Setup 74HC165 connections
pinMode(load, OUTPUT);
pinMode(clockEnablePin, OUTPUT);
pinMode(clockIn, OUTPUT);
pinMode(dataIn, INPUT);
}
void loop()
{
// Write pulse to load pin
digitalWrite(load, LOW);
delayMicroseconds(5);
digitalWrite(load, HIGH);
delayMicroseconds(5);
// Get data from 74HC165
digitalWrite(clockIn, HIGH);
digitalWrite(clockEnablePin, LOW);
byte incoming = shiftIn(dataIn, clockIn, LSBFIRST);
digitalWrite(clockEnablePin, HIGH);
// Print to serial monitor
Serial.print("Pin States:\r\n");
Serial.println(incoming, BIN);
delay(200);
}
so i ca read the incoming but i dont know how i could change those bits to the object buttons?
so i started searching and reading on the bitrate item you sended and found this link about the button object
this part i found interesting
*/
Button::Button(uint8_t buttonPin, uint8_t buttonMode){
pin=buttonPin;
pinMode(pin,INPUT);
buttonMode==BUTTON_PULLDOWN ? pulldown() : pullup(buttonMode);
state = 0;
bitWrite(state,CURRENT,!mode);
cb_onPress = 0;
cb_onRelease = 0;
cb_onClick = 0;
cb_onHold = 0;
numberOfPresses = 0;
triggeredHoldEvent = true;
}
is there a way i could change the pinmode to number of the shift register pin (eg A,B,C,D,E,F)?
i can split the results, the actual 6 states of all the buttons, in single states eg 6 ints for example.
So the state i can put intthis button but how about the pinmode (which is the link where the button is physically attached to) how can i make this link to the virtual shift register number for example?
if i can do this than i think i can make it work 
im feeling im coming close, just a little push is needed i think 
making the button object based on the shift register number will be the key i think 
any help would be grately appreciated!