If this calculator is windows forms application then:
just double click on the buttons in designer (visual studio designer where you created form and added buttons to it). This will add click handlers for your buttons.
for keypress select button, now in properties tab click on the lightening bolt icon (for showing events instead of properties in grid) and double click KeyPress event.
If you mean assigning shortcut keys then simply add & before button text like (&8), then user will be able to press Alt+8 to simulate clicking of 8 button.