Skip to main content

[archive] Alt-1 through Alt-0

  • November 15, 2010
  • 3 replies
  • 0 views

[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.

3 replies

[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.
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.

[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.
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.

[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.
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 :(