Click or drag to resize

KeyEvent Class

X#
Provide information about a KeyEvent, used to encapsulate information about the key that was pressed.
Inheritance Hierarchy
Object
  Event
    KeyEvent

Namespace:  VO
Assembly:  VOGUIClasses (in VOGUIClasses.dll) Version: 2.24 GA
Syntax
 CLASS KeyEvent INHERIT Event
Request Example View Source

The KeyEvent type exposes the following members.

Constructors
  NameDescription
Public methodKeyEvent
Initializes a new instance of the KeyEvent class
Top
Properties
  NameDescription
Public propertyASCIIChar
A numeric value representing the normal ASCII code for the key that caused this KeyEvent.
Public propertyKeyCode
A constant, indicating the code for the key that was pressed:
Public propertyRepeatCount
A numeric value determining whether a user depressed a key repeatedly or held it down for an extended period of time.
Public propertySystem
A logical value determining whether the Alt key was pressed at the same time as another key (TRUE if yes, FALSE if no).
Top
Remarks
KeyEvent events occur when the keyboard is used and are sent to Window:KeyDown() and Window:KeyUp().
Examples
This example moves the text cursor down one line when the user presses the Enter key. oCursorPoint defines the current location of the text cursor.
X#
1METHOD KeyDown(aKeyEvt) CLASS TopAppWindow
2IF(aKeyEvt:KeyCode() = KeyEnter)
3ts := SELF:TextSize('A'):Height() + 2
4oCursorPoint := Point{10,oCursorPoint:Y() - ts}
5ENDIF
See Also

Reference