Highlighted
Absent Member.
Absent Member.
199 views

[archive] Alt-1 through Alt-0

[Migrated content. Thread originally posted on 12 November 2010]

Hello All,
I was hoping to gain some insight as to whether or not I can map Alt-1 through Alt-0 using the Keystroke environment variable to an exception value. I have my code currently(see below) using Ctrl-1 through Ctrl-0 and it works fine, I believe i just need key code values for Alt-1 through Alt-0 for Windows.

SET ENVIRONMENT "KEYSTROKE" TO "EXCEPTION=500 A1".
SET ENVIRONMENT "KEYSTROKE" TO "EXCEPTION=501 A2".
SET ENVIRONMENT "KEYSTROKE" TO "EXCEPTION=502 A3".
SET ENVIRONMENT "KEYSTROKE" TO "EXCEPTION=503 A4".
SET ENVIRONMENT "KEYSTROKE" TO "EXCEPTION=504 A5".
SET ENVIRONMENT "KEYSTROKE" TO "EXCEPTION=505 A6".
SET ENVIRONMENT "KEYSTROKE" TO "EXCEPTION=506 A7".
SET ENVIRONMENT "KEYSTROKE" TO "EXCEPTION=507 A8".
SET ENVIRONMENT "KEYSTROKE" TO "EXCEPTION=508 A9".
SET ENVIRONMENT "KEYSTROKE" TO "EXCEPTION=509 A0".

Any help here would be greatly appreciated.
0 Likes
2 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Alt-1 through Alt-0

i think this dosn't work.

In the manual to redefine the keybord is this part:

Alt key sequences (except as noted in the preceding table), PrtSrcn, and F10 are directly handled by 32-bit Windows and cannot be referenced in COBOL. You can free the F10 key to act as a user defined key by using a configuration variable. Setting the F10_IS_MENU variable to "0" inhibits the standard menu activation capability for the F10 key. See Appendix H for more details.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Alt-1 through Alt-0

when i think about it, the only idea atm is:

place outside the visible area some buttons with Caption "&1 Button",.. "&2 Button",...
then you get the respond from your programm like the button is pressed with Alt-1 and so on...

But with this trick you have a new problem. The Focus from the current element is lost 😞
So you have to code a routine to save the last focus and reset it after alt-1 is pressed and so on. No propper solution i think 😞
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.