From Xojo Documentation


WebControl.KeyPressed(Details As Realbasic.KeyEvent)

New in 2011r2

Supported for all project types and targets.

A key was pressed and released in the control (this could be repeatedly if the user held down the key). The key that was released is in the passed Details parameter. It should be compared with the KeyEvent constants to determine which key was released.


This event handler is only called for the web page itself and text-based controls such as WebTextField, WebTextArea and WebSearchField.


The following code determines which Arrow key was pressed in a control.

Select Case details.KeyCode
Case details.KeyArrowDown
MessageBox("Down arrow")
Case details.KeyArrowLeft
MessageBox("Left arrow")
Case details.KeyArrowRight
MessageBox("Right arrow")
Case details.KeyArrowUp
MessageBox("Up arrow")
End Select

See Also

Realbasic.Keyevent constants.