DesktopUIControl.KeyDown

From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!
Event


DesktopUIControl.KeyDown(Key as String) As Boolean

New in 2021r3

Supported for all project types and targets.

The user has pressed the Key passed while the control has the focus.

Notes

How KeyDown works depends on the type of control.

TextField and TextArea Returning True means the key is intercepted, preventing the key from actually reaching the control at all. This would be useful if you want to override the behavior of the tab key for example. Returning False means the key reaches the control.

All Other Controls Returning True prevents the KeyDown event on the parent control (usually the window) from executing. Returning False results in the execution of the KeyDown event of the parent control.

See Also

Keyboard Module.