I’m trying to understand how the Details function works with respect to KeyCode. I am using the KeyPressed event in a Web project, and in that event I have tried the following and neither of them do anything when hitting the Tab key on the relevant field:
If details.KeyCode = 9 Then
MsgBox "Tab key pressed"
End If
If details.KeyCode = details.KeyTab Then
MsgBox "Tab key pressed"
End If
Desktop & web behave VERY differently in many respects
With a desktop project there is 0 distance between the app and the ui - they’re on the same machine
Not so on the internet
The UI may be running on a machine half way round the world (in the browser) and the App running on a server
So by the time the “keypressed” event gets to the app
the key has already been pressed and more than likely the key released - basically far too late for you to react
there may be a LOT of latency between the user pressing the key & the app being notified about it (thats the nature of the internet)
In Chrome it detects Alt, Ctrl, F1, as well as alphanumeric keys.
BUT if you are using for instance Internet Explorer, it does not detect them because IE simply does not honor the Keypressed event for control characters, arrow keys and function keys.