'Emacs style' delete line shortcut (CTRL/U) doesn't work correctly in Firefox

Chris Green cl at isbd.net
Thu Oct 11 08:59:36 UTC 2018


On Wed, Oct 10, 2018 at 12:54:49PM -0700, MR ZenWiz wrote:
> On Wed, Oct 10, 2018 at 2:14 AM Chris Green <cl at isbd.net> wrote:
> >
> > I have the 'Emacs style' keyboard shortcuts enabled on my [x]ubuntu
> > 18.04 systems.  The shortcut I use most often is the (not really
> > Emacs) CTRL/U for deleting a line of text.
> >
> > This should delete the whole line of text even if the cursor isn't
> > placed at the end of the line.  It *does* do this in other GUIs but in
> > Firefox it just deletes from the cursor to the start of the line.
> > This makes the shortcut much less useful as it means I need to move
> > the cursor to delete the line and this means I have to use the touchpad
> > or mouse.  The whole point (for me) of CTRL/U is that I don't need to
> > leave the keyboard to enter a new line.
> >
> > I'm fairly sure this *used* to work in Firefox.  Is it therefore a bug
> > I can report? .... or is there a workaround, i.e. a simple, keyboard
> > only, 'delete line' shortcut?
> >
> I realize I'm coming late to this party.
> 
> I have never seen ^U used for anything but 'delete from cursor to
> beginning of line.'  That's how it works in bash (and every other
> UNIX/Linux shell I've ever used), and most line oriented apps (think
> vi)
> 
Yes, I *could* be mis-remembering things.  I've just tried and you're
quite right regarding use in the shell.  However if you look at
/usr/share/themes/Emacs/gtk-2.0-key/gtkrc it definitely does 'move to
end and then delete:-

  bind "<ctrl>u" {
     "move-cursor" (paragraph-ends, -1, 0) 
     "delete-from-cursor" (paragraph-ends, 1) 

-- 
Chris Green




More information about the ubuntu-users mailing list