Hello dogeeuwu,
Do you mean that you want to record the keyboard sound through your microphone or amplifier?
Please refer to the following FAQ, first.
https://www.bandicam.com/faqs/multiple_sound_recording/
If you still have the same issue, please attach screenshots of the Bandicam Recording settings window and Windows Sound settings window.
Thank you.