GNOME Bugzilla – Bug 53614
KEYNAV: GtkTooltip
Last modified: 2011-02-04 16:09:17 UTC
It should be possible to call up the tooltip for the widget that currently has keyboard focus by pressing Ctrl+F1. The tooltip should remain on display until you press Esc or move keyboard focus to another component (or move the mouse?) [Check http://developer.gnome.org/projects/gap/keyboardnav.html for any later proposals that may not have filtered through to this bug report yet]
I have a patch along these lines
The attachment addresses the following issues: 1) If any control on the frontmost page of the notebook (including its page label) has focus, Ctrl+Tab (*) should move focus to the first control after the notebook. If any control on the frontmost page of the notebook (including its page label) has focus, Shift+Ctrl+Tab should move focus to the last control before the notebook. 2) When any control in the notebook has focus (including any page label), Ctrl+PgUp should bring the next tab to the front, and Ctrl+PgDn should bring the previous tab to the front. In either case, the control on the new frontmost page that last had focus is given focus again. 3) When any page label has focus, pressing Tab or Ctrl+down arrow should give focus to the first control on that page, bringing the selected page to the front if necessary. 4) When any control on the frontmost page has focus, pressing Ctrl+up arrow should give focus to that page's label. For 1), 2) and 4) a signal move_focus_out, move_focus_page, move_focus_up is defined for the required operation and if an ancestor of the focus widget supports the required operation it happens. For 3) a signal move_focus and key bindings are defined in gtknotebook.c to implement the operation.
The previous comment is incorrect in that it is for the wrong bug; it is for bug 53612. Havoc implemented Ctrl+F10 to show tooltip on June 28th. Issues with that change, in particular how to popdown tooltip are discussed in the mail http://mail.gnome.org/archives/gtk-devel-list/2001-May/msg00177.html I have copied the relevant section to here: ==================================================================== The actual gtktooltips changes aren't really right; the tooltip doesn't pop down in a coherent way. Calum suggests that the tooltip pop down on Escape or focus switch. This is really painful to implement, because doing it on Escape requires the tip to grab keyboard, and doing it on focus switch requires events to go to the window the tooltip is popped up for. Probably we can't just pop down on any key event since some may be needed for accessible navigation. The only implementations I can come up with require hardcoding the Escape key, because binding sets always absorb the keys they bind, and here we need to absorb Escape only in this one situation and pass through otherwise. Solutions involving enable/disable on binding signals or allowing binding signal emissions to indicate "event unhandled" seem a bit like overkill, but may be of general use. ===================================================================== I have attempted a fix which attempts to implement enable/disable on binding signals.
Created attachment 5687 [details] [review] Patch to implement tooltip popdown on Escape key
Created attachment 5939 [details] [review] Patch to implement current proposal
The patch attempts to implement the current proposal for supporting tooltips using the keyboard: Ctrl+F1 sets the keyboard_tooltips_mode on the window and causea the tooltips for the currently focussed widget to be shown. Ctrl+F1 will toggle the keyboard_tooltips_mode and Esc will unset keyboard_tooltips_mode. If it is decided that the use of Esc is not needed the patch can be simplified. One problem I have is that, when setting keyboard_tooltips_mode, I cannot determine whether there is a tooltip currently displayed because of mouse movement.
Adding GNOME2 keyword to all keynav bugs per sander's request. You can filter on the phrase 'luis doing GNOME2 work' to catch all instances of this so that you can ignore them.
See patch and coments in: http://mail.gnome.org/archives/gtk-devel-list/2002-February/msg00102.html
Wed Feb 13 15:42:42 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtktooltips.[ch] gtkwidget.c: Implement Control-F1 as toggle-tooltips-mode. * gtk/gtktooltips.c: Remove parsing of tooltips style string from here ... now in gtkrc.c.
Filed plug/socket issue as 71413