Extending the Custom Widget example to handle some key callbacks.