Ask Reuben
Enter/Escape/Tab vs Alternatives
Can I change my Genero application so that the user presses ENTER to accept a screen?
Why are my keys so unusual?
The Enter/Escape/Tab in the title refers to the keys you can use for the accept/cancel/nextfield actions respectively. Historically Informix-4gl had some what appears now unusual keystrokes. The below table is a summary of three entries from the Informix-4gl documentation with the 4th column showing the Genero action default name …
Key Name | Purpose of Key | Default Keystroke | Genero Action |
---|---|---|---|
Accept | Selects the current menu option in a MENU statement; terminates inout during CONSTRUCT, INPUT and INPUT ARRAYl terminates DISPLAY ARRAY | Escape | accept |
Interrupt | Represents the external interrupt signal; available when interrupts are deferred with the DEFER statement | CONTROL-C | cancel |
CONTROL-M or RETURN | Completes entry of the current field. Cursor moves to next field if any; else same as Accept | CONTROL-M or RETURN | nextfield |
Your Informix-4gl application would have used these keystrokes or used the OPTIONS statement to change the keys used. A well known Application Generator for example used F12 as an alternative to Escape to accept a dialog.
During your initial transformation from Informix-4gl to Genero, a decision would have been made wether to retain your application keystrokes or move forward using the conventional keystrokes that most GUI applications use. Genero by default used the keystrokes that most GUI applications used and if you look in our shipped FGLDIR/lib/default.4ad you will see …
name="accept" text="OK" acceleratorName="Return" acceleratorName2="Enter" name="cancel" validate="no" text="Cancel" acceleratorName="Escape" name="nextfield" text="Next Field" acceleratorName="Tab"
If your organisation wanted to keep their existing keystrokes, your copy of default.4ad would have had your keystrokes used of instead of Enter/Escape/Tab respectively. For instance you might see …
name="accept" text="OK" acceleratorName="Escape" name="cancel" validate="no" text="Cancel" acceleratorName="Control-C" name="nextfield" text="Next Field" acceleratorName="Enter" acceleratorName2="Return"
Reasons your organisation might have kept the keystrokes is because …
- did not want to cause disruption to user base by changing keystrokes
- did not want to have to change all the MESSAGE, DISPLAY statements that said something like “Press ESC to accept, Control-C to cancel”
If you are in this category, at the time of your next upgrade, you should revisit this decision.
The sky did not fall on the head of those Genero customers who did match their keystrokes to GUI conventions. In fact because most users were used to those keystrokes from other applications they adapted quickly. It also made it easier to onboard new users. You will also find that as your Genero application is used on different front-ends (Browsers, Mobile Devices etc) , you may find your application works better using conventional GUI keystrokes.
The other reason I say to visit this at the time of your next upgrade, that upgrade is likely to be a move from Native to Universal Rendering. The change of sight picture would enhance the move to a different series of keystrokes.
Footnote: See here for my article on the ENTER v RETURN key. which is another interesting topic in this area.