inkey.bas
来自「82 sample programs written in BASCOM-805」· BAS 代码 · 共 19 行
BAS
19 行
'--------------------------------------------------------------
' (c) 1997-2000 MCS Electronics
'--------------------------------------------------------------
' file: INKEY.BAS
' demo: INKEY , WAITKEY
'--------------------------------------------------------------
Dim A As Byte , S As String
Do
A = Inkey 'get ascii value from serial port
's = Inkey
If A > 0 Then 'we got something
Print "ASCII code " ; A ; " from serial"
End If
Loop Until A = 27 'until ESC is pressed
A = Waitkey 'wait for a key
's = waitkey
Print Chr(a)
End
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?