Highlighted
Absent Member.
Absent Member.
422 views

[archive] Making Enter act like Tab

[Migrated content. Thread originally posted on 30 June 2004]

Is it possible through the config file to make the Enter key act like tab in a GUI screen.

We currently have many GUI screens that work the "normal" Windows way, where you tab between fields and Enter presses the default (OK) button.

If a user wanted to change this so that Enter also moved between fields and did not press the default button, is this possible (without changing any programs)?

I tried something like

KEYSTROKE Edit=Next ^M
KEYSTROKE Edit=Next ^J

but that didn't seem to have any effect.
0 Likes
7 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Making Enter act like Tab

Try this

KEYSTROKE Edit=Next Terminate=13 ^M


Shaun
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Making Enter act like Tab

That didn't seem to make any difference.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Making Enter act like Tab

Sorry, didn't read your original post correctly when you said you had a default button.

We're using the config line I told you in our programs, but we don't have default buttons on there. The line allows our users to either use CR or TAB until the final field which is a button, buit not a default.

Shaun
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Making Enter act like Tab

Hmm, it seems odd to have a default button if you don't want the enter key to activate it. Maybe it's better not to have a default button in this scenario?
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Making Enter act like Tab

Yes, it is odd.

What I was really trying to get at was that we currently have all of our graphical screens working the "Windows" way - tab between fields, Enter presses the "OK" (i.e. default) button, etc.

But we have a need to make some parts of it work with another software package, which uses the Enter key to move between fields.

I was hoping to be able to provide a configuration option so the user can pick how they want to move between fields, and so we can default it to Enter when we operate along with this other software package, so the interface is similar.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Making Enter act like Tab

Interesting, so something like a NO_DEFAULT_BUTTON configuration entry that would disable default buttons? That would certainly make things easiar for you.
No idea how your app is constructed, but if there's a common point after screen section display that you can find the default button and conditionally remove it's ok-button or default-button style this might be reusable with all your screens. I'm not sure if a MODIFY MY-BUTTON NOT PBS-DEFAULT-BUTTON, NOT PBS-OK-BUTTON actually works though. According to acucobol 6.1 doc, the windows o/s may not correctly change styles on a control.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Making Enter act like Tab

Yes, enter key acts like tab if there is not a default PB. To unset a default button use MODIFY OK-PB, NOT DEFAULT-BUTTON.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.