GridKeyPress Event 24
Applies To: Grid

Description

If enabled, this event is generated when the user presses and releases a key in a Grid cell.

The GridKeyPress is reported on the Grid, after the KeyPress event, which is reported on the Input object associated with the current cell.

The event message reported as the result of ⎕DQ, or supplied as the right argument to your callback function, is a 6-element vector as follows :

[1] Object ref or character vector
[2] Event 'GridKeyPress' or 24
[3] Input Code character scalar or vector
[4] ASCII code integer scalar
[5] Key Number integer scalar
[6] Shift State integer scalar
[7] Input Object ref or character vector

For a full description of elements [3-6], see KeyPress event.

The 7th element of the event message contains either a reference to, or the name of the Input object associated with the current cell and on which the corresponding KeyPress event has been reported.

The default action of the GridKeyPress event is to pass a KeyPress event message back to the appropriate Input object to be actioned. The GridKeyPress is reported on the Grid, after the KeyPress event on the Input object. If a callback on the Input object's KeyPress event returns 0 or if a callback on GridKeyPress returns 0, the keystroke will be ignored.