alfonsop
New Member.
666 views

Function keys within grids

Jump to solution

Hi everyone,

Is there a way to capture function keys (F1, F2, etc.) while being in a grid's cell in entry mode?

I can only get EVENT-TYPE = MSG-FINISH-ENTRY (16393) and KEY-STATUS = W-EVENT (96) everytime I click F2, which are the same values I get when I hit Enter, so I don't have any means to recognize a function key within a cell.

 

Thanks.

0 Likes
2 Solutions

Accepted Solutions
Micro Focus Expert
Micro Focus Expert

RE: Function keys within grids

Jump to solution
Function keys can be processed at any time. The gridctl example program has an exception procedure for the screen and an event procedure for the grid. In the exception procedure add .. accept key-status from escape .. then run the program in debug, use a function key and the key-status variable will show the function key value.

View solution in original post

dkl
New Member.

RE: Function keys within grids

Jump to solution
Try this:

01 wrk-finish-key s9(02).

....
if event-type = msg-finish-entry
inquire my-grid finish-reason in wrk-finish-key
...

wrk-finish-key will contain the function key value

View solution in original post

4 Replies
Micro Focus Expert
Micro Focus Expert

RE: Function keys within grids

Jump to solution
Function keys can be processed at any time. The gridctl example program has an exception procedure for the screen and an event procedure for the grid. In the exception procedure add .. accept key-status from escape .. then run the program in debug, use a function key and the key-status variable will show the function key value.

View solution in original post

dkl
New Member.

RE: Function keys within grids

Jump to solution
Try this:

01 wrk-finish-key s9(02).

....
if event-type = msg-finish-entry
inquire my-grid finish-reason in wrk-finish-key
...

wrk-finish-key will contain the function key value

View solution in original post

alfonsop
New Member.

RE: Function keys within grids

Jump to solution

Thanks! This helped me. I also realized that I was modifying the value of EVENT-ACTION and that's why I got W-EVENT (96).

0 Likes
alfonsop
New Member.

RE: Function keys within grids

Jump to solution

Thansks! It was a great addition to shjerpe's answer. I was able to retrieve the finish reason before doing the regular grid processing.

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.