The macro keydef provides a simplified interface to define-key that smoothly handles a number of common complications.