The exercise problem doesn't mention interrupts, I won't use it here. The processor is doing nothing that must be interrupted, it can just wait for key presses in a loop.
If you prefer it though, PORTB change interrupt might be an option.
To detect key press an interrupt driven key scan is a good method.
For this a timer interrupt every 20...50ms is necessary.
The benefit is, that a precisely timed debounce can be easily implemented.
The main loop can concentrate on doing other things, without missing a keypress.