Skip to main content

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.

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.

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.

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.

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

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.

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


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.

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