diff options
author | Jorge Arellano Cid <jcid@dillo.org> | 2013-01-28 12:59:33 -0300 |
---|---|---|
committer | Jorge Arellano Cid <jcid@dillo.org> | 2013-01-28 12:59:33 -0300 |
commit | 55671b27e77fe4e95f6ba4e643764c6686e5ce9a (patch) | |
tree | 53487989ee8d97e1c95dc6f2f3de893b961c4239 /dw/fltkui.cc | |
parent | 90090d77dac8387ea576e67c9f9f5ae0a0215fcd (diff) |
Fix: dialog menu is keyboard-activable again (119c5d6ba0df regression)
The search engine option menu was activable with keyborad (Down key). Made
this work again. Also made FORM option menus activable with Down key.
Diffstat (limited to 'dw/fltkui.cc')
-rw-r--r-- | dw/fltkui.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/dw/fltkui.cc b/dw/fltkui.cc index c25fbf7a..f5a2339b 100644 --- a/dw/fltkui.cc +++ b/dw/fltkui.cc @@ -107,8 +107,11 @@ int CustChoice::handle(int e) this, e, active(), (Fl::focus() == this)); if (Fl::focus() != this) { ; // Not Focused, let FLTK handle it - } else if (e == FL_KEYDOWN) { - if (modifier == 0 && isalnum(k)) { + } else if (e == FL_KEYDOWN && modifier == 0) { + if (k == FL_Enter || k == FL_Down) { + return Fl_Choice::handle(FL_PUSH); // activate menu + + } else if (isalnum(k)) { // try key as shortcut to menuitem int t = value()+1 >= size() ? 0 : value()+1; while (t != value()) { const Fl_Menu_Item *mi = &(menu()[t]); |