In GTK combo boxes can be opened by pressing space when they are focused. I tried to implement this behaviour in WebKit but I got lost while debugging keyboard events handling :(
*** Bug 26818 has been marked as a duplicate of this bug. ***
Created attachment 32586 [details] Take away space out of ARROW_KEYS_POP_MENU and into SPACE_POP_MENU for platforms that display the popup when spacebar is pressed The patch takes away space (' ') out of ARROW_KEYS_POP_MENU and into SPACE_POP_MENU for platforms that want to display a popup menu when spacebar is pressed. No change in behaviour except for Gtk.
Comment on attachment 32586 [details] Take away space out of ARROW_KEYS_POP_MENU and into SPACE_POP_MENU for platforms that display the popup when spacebar is pressed This looks like it will break mac. You seem to want #if and #endif then another #if, not #elif This also needs a manual test.
Created attachment 32652 [details] addressed eric's feedback and added a manual test
Comment on attachment 32652 [details] addressed eric's feedback and added a manual test Looks good to me, after the changes. While you're at it, you could also have enter also open the combo box, to match what GTK+ does. Should be a matter of adding || keyCode == 'r' to the if inside SPACE_POP_MENU. Make it SPACE_AND_RETURN_POP_MENU =P.
Will land.
On second thought, I probably should go to sleep...
Created attachment 32984 [details] updated: return key should popup the menu list too for gtk
(In reply to comment #8) > Created an attachment (id=32984) [details] > updated: return key should popup the menu list too for gtk Now a ' ' will show the popup twice?
(In reply to comment #9) > (In reply to comment #8) > > Created an attachment (id=32984) [details] [details] > > updated: return key should popup the menu list too for gtk > > Now a ' ' will show the popup twice? To be more precise this can happen when both ARROW_KEYS_POP_MENU and SPACE_OR_RETURN_POP_MENU are set. It should be mutual exclusive given that the current code is #if #else #endif and we turn it into #if #endif, #if #else #endif.
Created attachment 33001 [details] Make it if-elif-else-endif as suggested by Holger
Comment on attachment 33001 [details] Make it if-elif-else-endif as suggested by Holger OKay, the next thing boils down to taste. To reduce code duplication one could do if ( #if SPACE_OR_.. keyCode == ' ' || keyCode == '\r' #elif keyCode == ' ' #endif ) { common Code }
(In reply to comment #12) > (From update of attachment 33001 [details]) Landed as http://trac.webkit.org/changeset/46081 > OKay, the next thing boils down to taste. To reduce code duplication one could > do > > if ( > #if SPACE_OR_.. > keyCode == ' ' || keyCode == '\r' > #elif > keyCode == ' ' > #endif > ) { > common Code > } I'll do this in a separate bug.