DENSO DENSO WAVE

Close

Technical Information

Application Development Manual | Detecting M1 key presses

Detecting M1 key presses

Function

Assigning key data to the M1 key allows the user application program to detect M1 key presses.

Syntax

Detailed Description

By default, the INKEY$ function cannot detect M1 key presses because the key has no key data assigned to it. The program must first assign any string with a KEY statement.

The same applies to the M2 key.

For further details on key numbers, refer to Appendix E "Key Number Assignment on the Keyboard" in the BHT-BASIC Programmer's Manual.

Examples
Wait until M1 key pressed
 "m" then       ' if key not M1
goto waitM1                ' wait for next key press
endif
print "M1"
Wait until M2 key pressed
  key 31, "n"
private waitM2$
waitM2:
wait 0,&h01                  ' wait for key press
waitM2$ = inkey$             ' read key data for key pressed
if waitM2$ <> "n" then       ' if key not M2
goto waitM2                ' wait for next key press
endif
print "M2"

Contact us

QBdirect

If you have not registered

The services on this member site are available only for registered customers.

New member reg.