Hello,I am Pete, and I'll be happy to assist with your question today.
Approximately how old is the keyboard?
Have you tried moving it closer to the USB receiver?
Have you tried testing the keyboard on a different computer?
Does any other external keyboard work with the Macbook?