Add register_shortcuts function

This fixes #23.