05-29-2024, 01:47 AM
Example of using devices for this:
Note that the keycodes here are different than whay you get for INKEY$ or _KEYHIT. These are mapped to the same as INP keycodes, if I remember correctly. See the wiki for full details and mapping listing.
Code: (Select All)
d% = _Devices 'always read number of devices to enable device input
Do
_Limit 30 'main loop
Do While _DeviceInput(1) 'loop only runs during a device 1 keyboard
For i = 1 To _LastButton(1)
If _Button(i) <> 0 And i <> 30 Then
If _Button(30) Then
Print "Left CTRL + Keycode #"; i; "down"
Else
Print "KeyCode #"; i; "down"
End If
End If
Next
Loop
Loop Until InKey$ = Chr$(27)
End
Note that the keycodes here are different than whay you get for INKEY$ or _KEYHIT. These are mapped to the same as INP keycodes, if I remember correctly. See the wiki for full details and mapping listing.