Input but for keys

Can we have something like it asks you to press certain keys? Like instead of asking you to input an answer it asks you to press a certain key combination
This could be used for learning shortcuts in programs like Photoshop
An easy example would be:
How do you make text bold?
Where you have to press Ctrl+B on your keyboard, and it works the same way as inputting an answer, it shows you which keys are right and which ones are wrong