Display pressed shortcuts as an overlay on the screen

Not sure which specific screencast you're speaking of, but they may be using Keycastr.


For the sake of completeness: Boinx Software's Mouseposé does this (and a lot more) as well ($17).