From Xojo Documentation
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.
The following code determines which Arrow key was pressed in a control.