KeyPress

<< Click to Display Table of Contents >>

 

KeyPress

KeyPress(KeyAscii)

Occurs when an E3Alarm has the keyboard focus and users press a key corresponding to a character that can be displayed on screen, that is, an ANSI key with a code indicated by the KeyAscii parameter. This event occurs when one of the following keys is pressed:

Any keyboard character that can be printed

The CTRL key combined with any standard alphabet character

The CTRL key combined with any special character

The BACKSPACE key

The ESC key

 

This event does not occur in the following conditions:

By pressing the TAB key

By pressing the ENTER key

By pressing the DEL key, which is not an ANSI key

By pressing keyboard arrow keys

When a key moves the focus from one object to another

 

While users press a key that produces an ANSI code, E3Alarm receives this event and the KeyDown event repeatedly. When users release that key, the KeyUp event occurs. To monitor keyboard physical status or to handle keys not recognized by this event, such as function or browsing keys, use the KeyDown and KeyUp events.

 

NOTE

For a list with all key codes available for the KeyAscii parameter, please check the article Keys Enumeration on Microsoft Developer Network.

Was this page useful?