If you press the TAB key, instead of a "TAB" string in msg.key it returns 8 bytes of $20 (TAB) characters as a string.
Is it at least an undocumented feature
(HollyWood 8, OS4)
Code: Select all
Function p_keys(msg)
Cls
Locate(0,0)
NPrint("OnKeyDown key:",msg.key)
NPrint("Length :",StrLen(msg.key))
NPrint("Unpacked:",Unpack(StrToArray(msg.key)))
EndFunction
InstallEventHandler({OnKeyDown=p_keys})
NPrint("Press a key")
Repeat
WaitEvent
Forever