Arguments: rid-widget row-section column-section row column row-number column-number buttons key-code
This generic function is called whenever the user presses a key on the
keyboard while a grid-widget
has the keyboard focus,
except when the pressed key is one that is used in a special reserved
way for grid navigation. These exceptions include tab, shift-tab,
enter, space, page-down, page-up, home, end, the four arrow keys, and
delete. In addition, this generic function is never called while the
user is typing into an
editable-text-column-mixin
cell.
An application may add cell-key-down methods to initiate some action when the user presses particular keys while particular cells have the keyboard focus. Often this action is to prompt the user in some way for a new value for the grid cell, or to automatically insert particular grid values depending on the key that was pressed. The cell-key-down methods may call write-cell-value to update the application's data in some way.
grid-widget, row-section, column-section, row, and column are the grid, grid sections, and grid subsections that contain the grid cell that currently has the keyboard focus. row-number and column-number are non-negative integers that indicate the sub-row or sub-column that has the focus when the subsection is replicated (due to having a section-count property that is greater than one); zero indicates the first subsection, and these numbers are always zero for non-replicated subsections.
buttons is an integer that indicates the mouse buttons and shift keys
that are down, and is some logior'ed combination of the values of
these bit-flag constants: left-mouse-button
, middle-mouse-button
, right-mouse-button
,
shift-key
,
control-key
,
and alt-key
.
key-code is an integer indicating the particular key that was pressed. If an alphanumeric character appears on the key, then key-code is the char-int of that character. Otherwise, key-code is the value of one of the character name constants beginning with "vk-".
The value of the constant key-names
is a list of all of the
"vk-" character names.
Here is the default method, which does nothing:
(defmethod cell-key-down ((grid-widget grid-widget)(row-section grid-row-section) (column-section grid-column-section) (row grid-row)(column grid-column) row-number column-number buttons key-code) (declare (ignore row-number column-number buttons key-code)) nil)
Common Graphics and IDE documentation is described in About Common Graphics and IDE documentation in cgide.htm.
The documentation is described in introduction.htm and the index is in index.htm.
Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.
Created 2000.10.5.