GNOME Bugzilla – Bug 72245
Ctrl-U not bound in entry widgets
Last modified: 2011-02-04 16:11:52 UTC
In 1.3.13 (and all previous versions), Ctrl-U was used to clear the text (as is standard throughout Unix/Linux). However, this has stopped working in 1.3.14. This is a major problem given that select-without-taking-primary is no longer supported in gtk+-2.0, as it makes using the primary selection very difficult (Ctrl-A is no good, as it claims primary).
This has nothing to do with update policy, see #61743. *** This bug has been marked as a duplicate of 61743 ***
Sorry, I meant to operate on another bug, ignore my comment.
There are three questions here: - Should C-u be in the default key bindings. I'd say pretty definitely not; we are keeping the amount of C-letter combinations there to a real minimum. (The default key bindings are defined in: http://developer.gnome.org/projects/gap/keyboardnav.html) - Should C-u by in the "Emacs" key binding set. I didn't put it there because it isn't a emacs key binding. - Should we have some other "unixy" key binding set that has C-u? (Anything else?)
*** Bug 72580 has been marked as a duplicate of this bug. ***
Created attachment 6970 [details] [review] Allow Shift+button-2 to replace the enter text with the primary selection
As far as I can see, the only advantage of Ctrl-U over Ctrl-A is that it provides a way to clear without losing the primary selection. By far the most common reason for wanting to do that is to replace the contents of the entry with the selection. The above patch allows the user to perform this operation by doing a middle-button click with Shift held down (eg, to copy '3128' from the http proxy port box into the ftp and ssh proxy boxes in a browser config, you would double click the 3128 and shift-2-click each of the other boxes in turn). This has the advantage of actually being quicker and easier than the old way. Long term, 'replace with selection' should perhaps be added to the popup menu too.
Moving non-critical or hard to fix bugs to 2.0.2
Move open bugs from milestones 2.0.[012] -- > 2.0.3, since 2.0.2 is already out.
*** Bug 78908 has been marked as a duplicate of this bug. ***
*** Bug 89587 has been marked as a duplicate of this bug. ***
Two other key bindings that are typically found alongside ^U in text entry areas: ^H, for delete backward one character, and ^W, for delete backward one word. ^H, in particular, has been supported for over a decade in nearly all unix apps, DOS, most windows apps, and many or most mac apps.
(from bug 89587) > It's called the "Emacs" keytheme. Not the "combination > of emacs and terminal keybindings supported by GNU readline"... :) In the case of ^H, make that GNU Readline, Unix shells (depending on stty settings) and programs like vi, gtk up to 2.0, kde, Motif, SunView, XView, DOS, Windows, MacOS, XUL/XBL, OS X, tk, and probably many others. (For ^U and ^W, the list is shorter and only includes the Unix toolkits, not mac/windows.)
*** Bug 90260 has been marked as a duplicate of this bug. ***
(Just adding comments in response to Owen's recent "should we fix for 2.2" email) I don't have particularly strong opinions on this as I don't use the emacs keybindings, but assuming ^U, ^W and ^H didn't clash with any other bindings in the Emacs set, I'd be inclined to add them to that and change its name accordingly. I suspect there are probably few people who are familiar with one set but not the other, and a lot more people who would be confused if ^W|U|H were added to the default set (especially with ^W, which is supposed to do File->Close in windows that support it).
*** Bug 98030 has been marked as a duplicate of this bug. ***
Thu Dec 12 17:58:41 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkrc.key.emacs: Add C-u/C-h/C-w. (#72245)
I just need to make sure I understand the resolution. The only way I can get this to function with the "GNOME" keybindings? I really abhore emacs, but clearing text fields easily I something I really appreciate. Is there a different key binding that will do the same thing for the "GNOME" setting?
The "Emacs" key theme just adds C-u and C-a and maybe one or two others to the standard key theme.
That rocks. Thanks Havoc and Owen.
*** Bug 111553 has been marked as a duplicate of this bug. ***