I have a MacBook Pro (model 10.1) with OsX Maverick.
When I press the power button the Mac goes to sleep mode. It's possible to wake up from it by pressing any key on the internal keyboard. That's fine.
I also have two external monitor (one via HDMI and the other via thunderbolt) attached to my MacBook Pro and an external USB keyboard. Any key on the external keyboard also wakes up the Mac.
When I put the MacBook in sleep mode I close the lid and I would like to disable the external keyboard. Is that possible? Even better, is it possible to put the Mac in sleep mode when I close the lid (with external monitor plugged in) and disable the external keyboard?