Trouble With "Enter" vs. "Tab" (Again)

Peter Underwood peterunderwood1 at gmail.com
Tue Nov 15 16:43:37 EST 2011


David T

If I may step outside GnuCash for a moment, perhaps the explanation of the
reason for different uses for Tab and Enter.

In any software development, if there is ANY differentiation required that
can use different keys, why would the developer cut his options and use,
say, a dialog box to ask which use you want to put the key to in that
particular case? These keyboards didn't just happen - they were used over a
long time and the forms we use now have been found useful by users.

Next, consider some of that other software. In any word program, text
editor etc wouldn't it be strange if I asked why the Tab and Enter keys
couldn't do the same thing? Enter (the artisit formerly known as Return)
evolved from the typerwriter "Carriage Return" lever which rolled the
roller (and therefore paper) up so that the keys would hit a newline and
then the lever continued to move to slide the carriage to the right causing
the keys to hit the left end of the line. In programming terms, that would
be called Newline = Carriage Return and Linefeed. A Tab key on both
typewriter obviously would do something entirely different.

OK now that you're sitting wondering what my point is, let's take an online
form in a commonly used browser (take your pick). If I am typing a form
with my address, email address etc, to move from one text box to the next,
I can click or I can use tab. Some forms where the code writer hasn't
bother to identify that an Enter has been pressed while a text box has
focus will actually cause nothing to happen. However, the commonly accepted
(by developers) and understood (by users who prefer to use keys rather than
a mouse wherever possible) protocol is that tab moves from textbox to
textbox and Enter submits the form. Try it for yourself with a simple
log-in page: Type the username and, assuming you haven't got an automatic
password entry, if you hit Tac (sometimes requiring more than once if there
is a Help or other link) your cursor will be in the password box. But if
instead you hit Enter, the Submit button will normally be "pressed" and you
will get an error message that your Username and Password combination is
incorrect, (Don't try that last one too many times in a row!)

Now back to GnuCash. While I'm sure that many if not all of the developers
have never even used a typewriter. But I'm sure that most, probably all
have come from exactly that background of the Enter vs. Tab protocol which
in simple terms says that if at the cursor there is possibility of
inserting a tab, move to the next item which can take focus. Oh! Guess what
- in most programming languages the order in which those objects accept the
focus when the Tab key is pressed is called the "Tab Order".

So in GnuCash, wherever there is a "next object in the tab order" and
someone presses the Tab key, the program does just what it says - it moves
to the next object - usually a box to enter data. It doesn't SUBMIT that
data any more than tabbing from the Username box to the Password box
submits the Username+blank Password combination. When in GnuCash the Enter
key can be accepted by the program (there aren't many places that it
can't), the "form" is submitted to the next action in the processing of the
data - blank or not - and any calculations are done and remaining boxes
filled by the program.

So I'm sorry to say that, while you personally may find it annoying to have
to remember, it would be considerably more annoying for anyone out here who
is used to the action of the Tab key in almost all software.

However, I wholeheartedly agree that including a reference or link to the
erudite points at which using different keys to move from one box to
another has different actions that might take rather longer to undo than
others. On that note, the developers are always seeking additional
volunteers to assist writing and updating help files. Perhaps that's an
area you could assist in David?

Peter


More information about the gnucash-user mailing list