+bool wxGenericComboControl::IsKeyPopupToggle(const wxKeyEvent& event) const
+{
+ int keycode = event.GetKeyCode();
+ bool isPopupShown = IsPopupShown();
+
+ // This code is AFAIK appropriate for wxGTK.
+
+ if ( isPopupShown )
+ {
+ if ( keycode == WXK_ESCAPE ||
+ ( keycode == WXK_UP && event.AltDown() ) )
+ return true;
+ }
+ else
+ {
+ if ( keycode == WXK_DOWN && event.AltDown() )
+ return true;
+ }
+
+ return false;
+}
+