David Pokorny wrote:
Hi,

When I'm typing math formulas, I often (accidentally) type a backspace
right after the end of a math box, deleting the entire box. When my
brain tells my right hand to hit delete, it thinks that only one
character will be deleted, so it is always a surprise (to my
"automatic brain" even though consciously I know better) to find the
entire math formula deleted.
This sort of thing is usually remedied by using LyX for
a while.  You simply get used to it, and then it is
not a problem any more.

LyX is different at times, and might take some getting used to.
The things that gets changed is usually cases where LyX forces
one to do unnecessary extra work to achieve something
simple.  This does not seem to be such a case, or is
deleting the last character in a math inset really a very common
case for you?

Or is this a case of "accidentally typed space, ending the
math inset, now pressing backspace to get back in?"  This
one is of course better solved by avoiding the wrong space,
as that saves two unnecessary keystrokes.  And if it
happens anyway, just press left arrow.  LyX won't
let you create long series of spaces anyway, so you don't
have to delete them.

This is easily remedied by typing undo,
but it is a minor nuisance. The behavior my "automatic brain" expects
is either

A) what you would get by typing a left arrow followed by a backspace
You mean left arrow + delete I guess?
B) what you would get by typing a left arrow
Well, backspace always erases something.
In fact case B) seems slightly more useful since it allows you to add
more to a math formula without typing a left arrow; case B) is also
symmetric with the behavior that typing a space at the last position
of a math box leaves the box but does not insert a character.
Having backspace work like B) is actually superfluous,
since left arrow already performs that function. Having
several keys do exactly the same is usually a waste.
Can one of the LyX Gurus please enlighten me as to how I can achieve
behavior B? I am not averse to tweaking the source code if this is the
only way.
You can change the definition of backspace in the ui files, I think.
But if you change it to "left arrow" then it will be "left arrow"
in all cases, not just when dealing with a math inset.

Otherwise I think changing the source is the only way.
You risk ending up with a LyX different from everybody else's
though, and having to make this change in every new release
you want to use. I don't think you'll get the development team to
accept a change when training will achieve the same result.

Helge Hafting

Reply via email to