WebControl.KeyPressed
From Xojo Documentation
Event
WebControl.KeyPressed(Details As Realbasic.KeyEvent)
New in 2011r2
Supported for all project types and targets.
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.
Notes
This event handler is only called for the web page itself and text-based controls such as WebTextField, WebTextArea and WebSearchField.
Example
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
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.