/** * Executed when the user hits any key * @param $widget Source Widget of the event * @param $event Associated GdkEvent * @ignore-autocomplete on */ public function onKeyPress($widget, $event) { if ($event->keyval == Gdk::KEY_Escape) { parent::hide(); } }