Control widget with key press?

The widget draws fine, just not accepting any input. Is there another step/setting needed to make this work?