Shift register and leds

Can you use buttons or/and switches, to control individual leds or patterns of leds that are connected to a shift register?

Say 16 leds that will produce a different pattern, depending what buttons are pressed?

Yes and Yes.

Say you had 4 buttons.
You read them into a byte:

selectionByte = 0; // clear the byte
selectionByte = digitalRead(button4); // capture button in bit0
selectionByte = selectionByte <1; // move the bits left one position
selectionByte = digitalRead(button3); // capture button in bit0
selectionByte = selectionByte <1; // move the bits left one position
selectionByte = digitalRead(button2); // capture button in bit0
selectionByte = selectionByte <1; // move the bits left one position
selectionByte = digitalRead(button1); // capture button in bit0

so now you have selectionByte = 0 - 0 -0 -0 -button4-button3-button2-button1, representing a number from 0 to 15.

now run your pattern
switch(selectionByte){
case 0:
// pattern 0 code, or a fixed pattern:
shiftout(dataPin, clockPin, MSBFIRST, pattern0);
break;
case 1:
// pattern 1 code
break;
:
:
case 15:
// pattern 15 code
break;
} // end pattern switch

This is great help..Thanks for the solution.