_Keydown(37) is for Shift + % in QB64pe
Here is code I use to tell me Inkey$ or _Keyhit # which is usually the same for _Keydown
Here is code I use to tell me Inkey$ or _Keyhit # which is usually the same for _Keydown
Code: (Select All)
While 1 'find code for keypress
k$ = InKey$
hk& = _KeyHit
If Len(k$) Then
Select Case Len(k$)
Case 1: Print "1 char keypress = "; Asc(k$); " keyhit = "; hk&
Case 2: Print "2 char keypress = "; Asc(Right$(k$, 1)); " keyhit = "; hk&
End Select
End If
_Display
_Limit 60
Wend
Print "Goodbye."
'findings
'<esc> pressed twice exits this screen! number printed after 2nd press of any
'Alt + letter -> 2 char keypress numbers seem to jump all around they are QWERTY order?
'Ctrl + letter -> 1 char A = 1, B = 2...
'Ctrl + m is same as <enter>
'arrows
'up 72, dowm 80, left 75, right 77
' _keyhit constants
' up 18432
' down 20480
' left 19200
' right 19712
' pg up 18688
' pgdwn 20736
Const KEY_ARROW_LEFT = 19200
Const KEY_ARROW_UP = 18432
Const KEY_ARROW_RIGHT = 19712
Const KEY_ARROW_DOWN = 20480
Const KEY_PAGE_UP = 18688
Const KEY_PAGE_DOWN = 20736
b = b + ...