Back to product page

KeyPressSpecial event


Fires when special key is pressed.

Syntax

  • Basic
Private Sub object_KeyPressSpecial (ByRef KeyNum)
The KeyPressSpecial(KeyNum) syntax has these parts:
KeyNumSpecialKeysEnum enumeration. Represents special key that was pressed.

Remarks

This event is only available in OCX (GUI) version of the component.

Not all keys can be handled by KeyPress event. For example, if user press TAB key, your application may try to change focus inside application window, or, for example, if user press F10 it may try to show some menu.

If you want to process these special keys, then you should intercept them in this event, and implement some code for keys you're interested in. For example, you can make F10 close the application you're currently running on the server. wodTelnetDLX will (when TerminalEmulation is set to VT100Emulation or LinuxEmulation) handle several special keys, such as arrow keys, function keys, etc. When they are pressed, it will send ANSI escape codes for those keys to the server.

If you don't want wodTelnetDLX to handle some special key, you should set KeyNum value to 0, in which case wodTelnetDLX will just ignore it. If user presses combination of CTRL, ALT or SHIFT key together with some other key, KeyNum will contain OR value of these two (or more) keys.

For example, if you want to handle ALT+F4 to end your application, you can use code like this:
 
Private Sub wodTelnetDLX1_KeyPressSpecial(KeyNum As WODTELNETDLXCtl.SpecialKeysEnum)
 If KeyNum = specALT + specF4 Then End
End Sub
 


Platforms

Windows