|Top Previous Next|
Is triggered when a user presses and releases a key or a key combination.
Object.KeyPress( nKeyCode, nShiftAltCtrl )
A number that identifies the key being pressed.
A bit pattern that specifies which modifier keys have been pressed along with the key identified by nKeyCode. The following table lists the bits.
The parameter is the sum of these bits. Some, none or all of these bits can be set. For example, if ALT and CTRL are pressed, the parameter is 6. Valid values range from 0 to 7. Call the BITTEST() function to test for a particular key. Pass the number of the bit as identified by the Bit column value.
Applies to: TextBox Control | ListBox Control
Only nKeyCode = 13 and nShiftAltCtrl = 0 are currently supported. On the desktop, KeyPress is only supported in the ListBox control.