Using a HardKey object you can catch the keypress event of the hardware keys.
Example:
'Add a reference to the Hardware library and add a HardKey object named
hk.
Sub Globals
End Sub
Sub App_Start
Form1.show
hk.new1("form1",true,true,true) 'Catch the five hardware keys
and the
cursor keys.
End Sub
sub hk_HardKeyPressed
Select hk.KeyPressed
case hk.Key1
msgbox("Key1 was pressed")
case hk.Key2
msgbox("Key2 was pressed")
case hk.Key3
msgbox("Key3 was pressed")
case hk.Key4
msgbox("Key4 was pressed")
case hk.Key5
msgbox("Key5 was pressed")
case hk.KeyLeft
msgbox("Left key was pressed")
case hk.KeyRight
msgbox("Right key was pressed")
case hk.KeyUp
msgbox("Up key was pressed")
case hk.KeyDown
msgbox("Down key was pressed")
case hk.KeyEnter
msgbox("Enter key was pressed")
End Select
end sub