ReneMiner
23-02-2013, 16:05
I wrote some little utility to find out, which key is related to what %VK-equate and to find out numbers of keys that don't have equates and also to find out what those strange keys as %VK_KANA, %VK_JUNJA or %VK_MODECHANGE are...
If you run this you can do some input and the script will tell what occured. It's to fast to read if a key was pushed down or released, but it tells if you hold one.
Now I experience the following:
If I push the left ALT-key once, TBGL_GetWindowKeyState() keeps on returning <> 0 all the time until I push the same key a second time.
Is it my keyboard that has malfunctions or the TBGL-function? ALT-key doesn't have a "lock"-state, does it? I'm not sure about that so I did not create an issue yet.
Another odd thing: if using "editing keys" as arrows, insert, page down etc. there's always Key 255 displayed together with them. So I thought it would mark editing-keys, if key 255 is true. But the only key that displays 255 all alone is the Pause-Key (above Page Up on my keyboard) - so it might have some "Edit-Key-Flag" but not an assigned key-number.
here's the script for testing:
Uses "TBGL"
Begin Const
' -- key-states
%KS_Up = -1
%KS_Not
%KS_Down
%KS_Hold
End Const
Global hWnd As DWord
Global keyState(255) As Long
Global keyLastDown As Long
Dim MouseWheel, MouseDeltaX, MouseDeltaY As Long
Function TBMain()
Local i, row As Long
' -- Create and show window
hWnd = TBGL_CreateWindowEx("TBGL script - press ESC to quit", 384, 256, 32, _
%TBGL_WS_DONTSIZE _
Or %TBGL_WS_WINDOWED _
Or %TBGL_WS_CLOSEBOX)
TBGL_ShowWindow
TBGL_BuildFont TBGL_FontHandle("System", 9), 1
' -- Resets status of all keys
TBGL_ResetKeyState()
TBGL_UseTexturing(FALSE) ' will just draw text and boxes...
TBGL_RenderMatrix2D(0, 256, 384, 0) ' and just 2D
TBGL_SetActiveFont 1
TBGL_Color 255, 255, 127
' -- Main loop
While TBGL_IsWindow(hWnd)
TBGL_ClearFrame
TBGL_PrintFont("do some input", 4, 24)
If is_Input Then
row = 3
If Mousewheel < 0 Then
TBGL_PrintFont("mousewheel down", 4, 12 + 16 * row)
ElseIf Mousewheel > 0 Then
TBGL_PrintFont("mousewheel up", 4, 12 + 16 * row)
EndIf
row += 1
If MouseDeltaX < 0 Then
TBGL_PrintFont("mouse moved left", 4, 12 + 16 * row)
ElseIf MouseDeltaX > 0 Then
TBGL_PrintFont("mouse move right", 4, 12 + 16 * row)
EndIf
row += 1
If MouseDeltaY < 0 Then
TBGL_PrintFont("mouse move up", 4, 12 + 16 * row)
ElseIf MouseDeltaY > 0 Then
TBGL_PrintFont("mouse move down", 4, 12 + 16 * row)
EndIf
For i = 1 To 255
Select Case keystate(i)
Case %ks_Up
row += 1
TBGL_PrintFont(get_VK_Equate(i) + "---> %ks_UP", 4, 12 + 16 * row)
Case %ks_Not
Case %ks_Down
row += 1
TBGL_PrintFont(get_VK_Equate(i) + "---> %ks_DOWN", 4, 12 + 16 * row)
Case %ks_Hold
row += 1
TBGL_PrintFont(get_VK_Equate(i) + "---> %ks_HOLD", 4, 12 + 16 * row)
End Select
Next i
If keyLastDown Then
row += 1
TBGL_PrintFont("just went down " + get_VK_Equate(keyLastDown), 4, 12 + 16 * row)
EndIf
EndIf
TBGL_DrawFrame
' -- ESCAPE key to exit application
If TBGL_GetWindowKeyState(hWnd, %VK_ESCAPE) Then Exit While
Wend
TBGL_DestroyWindow
End Function
' -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Function is_Input() As Boolean
Static lX, lY As Long
Static doOnce As Boolean
Local i As Long
' -- check & store the key- and mousebutton-states
keyLastDown = 0
For i = 1 To 255
If TBGL_GetWindowKeyState(hWnd, i) Then
Select Case keyState(i)
Case %KS_Not,%KS_Up
keyState(i) = %KS_Down
' remember key last down
keyLastDown = i
Case Else
keyState(i) = %Ks_Hold
End Select
Function = TRUE
Else
Select Case keystate(i)
Case %KS_Down, %KS_Hold
keyState(i) = %KS_Up
Function = TRUE
Case Else
keyState(i) = %KS_Not
End Select
EndIf
Next i
' -- check and store mouse-movements to global
If doOnce Then
' don't return "True" for the very first frame
MouseWheel = TBGL_MouseGetWheelDelta
MouseDeltaX = TBGL_MouseGetPosX - lX
MouseDeltaY = TBGL_MouseGetPosY - lY
EndIf
If MouseDeltaX Then Function = TRUE
If MouseDeltaY Then Function = TRUE
If Mousewheel Then Function = TRUE
lY = TBGL_MouseGetPosY
lX = TBGL_MouseGetPosX
doOnce = TRUE
End Function
'------------------------------------------------
Function get_VK_Equate(ByVal vKey As Long) As String
' just return a string of the keys equate
Select Case vKey
Case %VK_LBUTTON
Return "%VK_LBUTTON "
Case %VK_RBUTTON
Return "%VK_RBUTTON "
Case %VK_MBUTTON
Return "%VK_MBUTTON "
Case %VK_LEFT
Return "%VK_LEFT "
Case %VK_UP
Return "%VK_UP "
Case %VK_RIGHT
Return "%VK_RIGHT "
Case %VK_DOWN
Return "%VK_DOWN "
Case %VK_RETURN
Return "%VK_RETURN "
Case %VK_SHIFT
Return "%VK_SHIFT "
Case %VK_CONTROL
Return "%VK_CONTROL "
Case %VK_MENU
Return "%VK_MENU "
Case %VK_LSHIFT
Return "%VK_LSHIFT "
Case %VK_RSHIFT
Return "%VK_RSHIFT "
Case %VK_LCONTROL
Return "%VK_LCONTROL "
Case %VK_RCONTROL
Return "%VK_RCONTROL "
Case %VK_LMENU
Return "%VK_LMENU "
Case %VK_RMENU
Return "%VK_RMENU "
Case %VK_SPACE
Return "%VK_SPACE "
Case %VK_PGUP
Return "%VK_PGUP "
Case %VK_PGDN
Return "%VK_PGDN "
Case %VK_END
Return "%VK_END "
Case %VK_HOME
Return "%VK_HOME "
Case %VK_0
Return "%VK_0 "
Case %VK_1
Return "%VK_1 "
Case %VK_2
Return "%VK_2 "
Case %VK_3
Return "%VK_3 "
Case %VK_4
Return "%VK_4 "
Case %VK_5
Return "%VK_5 "
Case %VK_6
Return "%VK_6 "
Case %VK_7
Return "%VK_7 "
Case %VK_8
Return "%VK_8 "
Case %VK_9
Return "%VK_9 "
Case %VK_A
Return "%VK_A "
Case %VK_B
Return "%VK_B "
Case %VK_C
Return "%VK_C "
Case %VK_D
Return "%VK_D "
Case %VK_E
Return "%VK_E "
Case %VK_F
Return "%VK_F "
Case %VK_G
Return "%VK_G "
Case %VK_H
Return "%VK_H "
Case %VK_I
Return "%VK_I "
Case %VK_J
Return "%VK_J "
Case %VK_K
Return "%VK_K "
Case %VK_L
Return "%VK_L "
Case %VK_M
Return "%VK_M "
Case %VK_N
Return "%VK_N "
Case %VK_O
Return "%VK_O "
Case %VK_P
Return "%VK_P "
Case %VK_Q
Return "%VK_Q "
Case %VK_R
Return "%VK_R "
Case %VK_S
Return "%VK_S "
Case %VK_T
Return "%VK_T "
Case %VK_U
Return "%VK_U "
Case %VK_V
Return "%VK_V "
Case %VK_W
Return "%VK_W "
Case %VK_X
Return "%VK_X "
Case %VK_Y
Return "%VK_Y "
Case %VK_Z
Return "%VK_Z "
Case %VK_CANCEL
Return "%VK_CANCEL "
Case %VK_XBUTTON1
Return "%VK_XBUTTON1 "
Case %VK_XBUTTON2
Return "%VK_XBUTTON2 "
Case %VK_BACK
Return "%VK_BACK "
Case %VK_TAB
Return "%VK_TAB "
Case %VK_LINEFEED
Return "%VK_LINEFEED "
Case %VK_CLEAR
Return "%VK_CLEAR "
Case %VK_PAUSE
Case %VK_CAPITAL
Return "%VK_CAPITAL "
Case %VK_KANA
Return "%VK_KANA "
Case %VK_HANGUL
Return "%VK_HANGUL "
Case %VK_JUNJA
Return "%VK_JUNJA "
Case %VK_FINAL
Return "%VK_FINAL "
Case %VK_HANJA
Return "%VK_HANJA "
Case %VK_KANJI
Return "%VK_KANJI "
Case %VK_ESCAPE
Return "%VK_ESCAPE "
Case %VK_CONVERT
Return "%VK_CONVERT "
Case %VK_NONCONVERT
Return "%VK_NONCONVERT "
Case %VK_ACCEPT
Return "%VK_ACCEPT "
Case %VK_MODECHANGE
Return "%VK_MODECHANGE "
Case %VK_PRIOR
Return "%VK_PRIOR "
Case %VK_NEXT
Return "%VK_NEXT "
Case %VK_SELECT
Return "%VK_SELECT "
Case %VK_PRINT
Return "%VK_PRINT "
Case %VK_EXECUTE
Return "%VK_EXECUTE "
Case %VK_SNAPSHOT
Return "%VK_SNAPSHOT "
Case %VK_INSERT
Return "%VK_INSERT "
Case %VK_DELETE
Return "%VK_DELETE "
Case %VK_HELP
Return "%VK_HELP "
Case %VK_LWIN
Return "%VK_LWIN "
Case %VK_RWIN
Return "%VK_RWIN "
Case %VK_APPS
Return "%VK_APPS "
Case %VK_SLEEP
Return "%VK_SLEEP "
Case %VK_NUMPAD0
Return "%VK_NUMPAD0 "
Case %VK_NUMPAD1
Return "%VK_NUMPAD1 "
Case %VK_NUMPAD2
Return "%VK_NUMPAD2 "
Case %VK_NUMPAD3
Return "%VK_NUMPAD3 "
Case %VK_NUMPAD4
Return "%VK_NUMPAD4 "
Case %VK_NUMPAD5
Return "%VK_NUMPAD5 "
Case %VK_NUMPAD6
Return "%VK_NUMPAD6 "
Case %VK_NUMPAD7
Return "%VK_NUMPAD7 "
Case %VK_NUMPAD8
Return "%VK_NUMPAD8 "
Case %VK_NUMPAD9
Return "%VK_NUMPAD9 "
Case %VK_MULTIPLY
Return "%VK_MULTIPLY "
Case %VK_ADD
Return "%VK_ADD "
Case %VK_SEPARATOR
Return "%VK_SEPARATOR "
Case %VK_SUBTRACT
Return "%VK_SUBTRACT "
Case %VK_DECIMAL
Return "%VK_DECIMAL "
Case %VK_DIVIDE
Return "%VK_DIVIDE "
Case %VK_F1
Return "%VK_F1 "
Case %VK_F2
Return "%VK_F2 "
Case %VK_F3
Return "%VK_F3 "
Case %VK_F4
Return "%VK_F4 "
Case %VK_F5
Return "%VK_F5 "
Case %VK_F6
Return "%VK_F6 "
Case %VK_F7
Return "%VK_F7 "
Case %VK_F8
Return "%VK_F8 "
Case %VK_F9
Return "%VK_F9 "
Case %VK_F10
Return "%VK_F10 "
Case %VK_F11
Return "%VK_F11 "
Case %VK_F12
Return "%VK_F12 "
Case %VK_F13
Return "%VK_F13 "
Case %VK_F14
Return "%VK_F14 "
Case %VK_F15
Return "%VK_F15 "
Case %VK_F16
Return "%VK_F16 "
Case %VK_F17
Return "%VK_F17 "
Case %VK_F18
Return "%VK_F18 "
Case %VK_F19
Return "%VK_F19 "
Case %VK_F20
Return "%VK_F20 "
Case %VK_F21
Return "%VK_F21 "
Case %VK_F22
Return "%VK_F22 "
Case %VK_F23
Return "%VK_F23 "
Case %VK_F24
Return "%VK_F24 "
Case %VK_NUMLOCK
Return "%VK_NUMLOCK "
Case %VK_SCROLL
Return "%VK_SCROLL "
Case Else
Return Str$(vKey)
End Select
End Function
btw. it would be great if TBGL had an TBGL_isInput(hWnd)-function that returns also current states of the %VK-keys+buttons as in here.
If you run this you can do some input and the script will tell what occured. It's to fast to read if a key was pushed down or released, but it tells if you hold one.
Now I experience the following:
If I push the left ALT-key once, TBGL_GetWindowKeyState() keeps on returning <> 0 all the time until I push the same key a second time.
Is it my keyboard that has malfunctions or the TBGL-function? ALT-key doesn't have a "lock"-state, does it? I'm not sure about that so I did not create an issue yet.
Another odd thing: if using "editing keys" as arrows, insert, page down etc. there's always Key 255 displayed together with them. So I thought it would mark editing-keys, if key 255 is true. But the only key that displays 255 all alone is the Pause-Key (above Page Up on my keyboard) - so it might have some "Edit-Key-Flag" but not an assigned key-number.
here's the script for testing:
Uses "TBGL"
Begin Const
' -- key-states
%KS_Up = -1
%KS_Not
%KS_Down
%KS_Hold
End Const
Global hWnd As DWord
Global keyState(255) As Long
Global keyLastDown As Long
Dim MouseWheel, MouseDeltaX, MouseDeltaY As Long
Function TBMain()
Local i, row As Long
' -- Create and show window
hWnd = TBGL_CreateWindowEx("TBGL script - press ESC to quit", 384, 256, 32, _
%TBGL_WS_DONTSIZE _
Or %TBGL_WS_WINDOWED _
Or %TBGL_WS_CLOSEBOX)
TBGL_ShowWindow
TBGL_BuildFont TBGL_FontHandle("System", 9), 1
' -- Resets status of all keys
TBGL_ResetKeyState()
TBGL_UseTexturing(FALSE) ' will just draw text and boxes...
TBGL_RenderMatrix2D(0, 256, 384, 0) ' and just 2D
TBGL_SetActiveFont 1
TBGL_Color 255, 255, 127
' -- Main loop
While TBGL_IsWindow(hWnd)
TBGL_ClearFrame
TBGL_PrintFont("do some input", 4, 24)
If is_Input Then
row = 3
If Mousewheel < 0 Then
TBGL_PrintFont("mousewheel down", 4, 12 + 16 * row)
ElseIf Mousewheel > 0 Then
TBGL_PrintFont("mousewheel up", 4, 12 + 16 * row)
EndIf
row += 1
If MouseDeltaX < 0 Then
TBGL_PrintFont("mouse moved left", 4, 12 + 16 * row)
ElseIf MouseDeltaX > 0 Then
TBGL_PrintFont("mouse move right", 4, 12 + 16 * row)
EndIf
row += 1
If MouseDeltaY < 0 Then
TBGL_PrintFont("mouse move up", 4, 12 + 16 * row)
ElseIf MouseDeltaY > 0 Then
TBGL_PrintFont("mouse move down", 4, 12 + 16 * row)
EndIf
For i = 1 To 255
Select Case keystate(i)
Case %ks_Up
row += 1
TBGL_PrintFont(get_VK_Equate(i) + "---> %ks_UP", 4, 12 + 16 * row)
Case %ks_Not
Case %ks_Down
row += 1
TBGL_PrintFont(get_VK_Equate(i) + "---> %ks_DOWN", 4, 12 + 16 * row)
Case %ks_Hold
row += 1
TBGL_PrintFont(get_VK_Equate(i) + "---> %ks_HOLD", 4, 12 + 16 * row)
End Select
Next i
If keyLastDown Then
row += 1
TBGL_PrintFont("just went down " + get_VK_Equate(keyLastDown), 4, 12 + 16 * row)
EndIf
EndIf
TBGL_DrawFrame
' -- ESCAPE key to exit application
If TBGL_GetWindowKeyState(hWnd, %VK_ESCAPE) Then Exit While
Wend
TBGL_DestroyWindow
End Function
' -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Function is_Input() As Boolean
Static lX, lY As Long
Static doOnce As Boolean
Local i As Long
' -- check & store the key- and mousebutton-states
keyLastDown = 0
For i = 1 To 255
If TBGL_GetWindowKeyState(hWnd, i) Then
Select Case keyState(i)
Case %KS_Not,%KS_Up
keyState(i) = %KS_Down
' remember key last down
keyLastDown = i
Case Else
keyState(i) = %Ks_Hold
End Select
Function = TRUE
Else
Select Case keystate(i)
Case %KS_Down, %KS_Hold
keyState(i) = %KS_Up
Function = TRUE
Case Else
keyState(i) = %KS_Not
End Select
EndIf
Next i
' -- check and store mouse-movements to global
If doOnce Then
' don't return "True" for the very first frame
MouseWheel = TBGL_MouseGetWheelDelta
MouseDeltaX = TBGL_MouseGetPosX - lX
MouseDeltaY = TBGL_MouseGetPosY - lY
EndIf
If MouseDeltaX Then Function = TRUE
If MouseDeltaY Then Function = TRUE
If Mousewheel Then Function = TRUE
lY = TBGL_MouseGetPosY
lX = TBGL_MouseGetPosX
doOnce = TRUE
End Function
'------------------------------------------------
Function get_VK_Equate(ByVal vKey As Long) As String
' just return a string of the keys equate
Select Case vKey
Case %VK_LBUTTON
Return "%VK_LBUTTON "
Case %VK_RBUTTON
Return "%VK_RBUTTON "
Case %VK_MBUTTON
Return "%VK_MBUTTON "
Case %VK_LEFT
Return "%VK_LEFT "
Case %VK_UP
Return "%VK_UP "
Case %VK_RIGHT
Return "%VK_RIGHT "
Case %VK_DOWN
Return "%VK_DOWN "
Case %VK_RETURN
Return "%VK_RETURN "
Case %VK_SHIFT
Return "%VK_SHIFT "
Case %VK_CONTROL
Return "%VK_CONTROL "
Case %VK_MENU
Return "%VK_MENU "
Case %VK_LSHIFT
Return "%VK_LSHIFT "
Case %VK_RSHIFT
Return "%VK_RSHIFT "
Case %VK_LCONTROL
Return "%VK_LCONTROL "
Case %VK_RCONTROL
Return "%VK_RCONTROL "
Case %VK_LMENU
Return "%VK_LMENU "
Case %VK_RMENU
Return "%VK_RMENU "
Case %VK_SPACE
Return "%VK_SPACE "
Case %VK_PGUP
Return "%VK_PGUP "
Case %VK_PGDN
Return "%VK_PGDN "
Case %VK_END
Return "%VK_END "
Case %VK_HOME
Return "%VK_HOME "
Case %VK_0
Return "%VK_0 "
Case %VK_1
Return "%VK_1 "
Case %VK_2
Return "%VK_2 "
Case %VK_3
Return "%VK_3 "
Case %VK_4
Return "%VK_4 "
Case %VK_5
Return "%VK_5 "
Case %VK_6
Return "%VK_6 "
Case %VK_7
Return "%VK_7 "
Case %VK_8
Return "%VK_8 "
Case %VK_9
Return "%VK_9 "
Case %VK_A
Return "%VK_A "
Case %VK_B
Return "%VK_B "
Case %VK_C
Return "%VK_C "
Case %VK_D
Return "%VK_D "
Case %VK_E
Return "%VK_E "
Case %VK_F
Return "%VK_F "
Case %VK_G
Return "%VK_G "
Case %VK_H
Return "%VK_H "
Case %VK_I
Return "%VK_I "
Case %VK_J
Return "%VK_J "
Case %VK_K
Return "%VK_K "
Case %VK_L
Return "%VK_L "
Case %VK_M
Return "%VK_M "
Case %VK_N
Return "%VK_N "
Case %VK_O
Return "%VK_O "
Case %VK_P
Return "%VK_P "
Case %VK_Q
Return "%VK_Q "
Case %VK_R
Return "%VK_R "
Case %VK_S
Return "%VK_S "
Case %VK_T
Return "%VK_T "
Case %VK_U
Return "%VK_U "
Case %VK_V
Return "%VK_V "
Case %VK_W
Return "%VK_W "
Case %VK_X
Return "%VK_X "
Case %VK_Y
Return "%VK_Y "
Case %VK_Z
Return "%VK_Z "
Case %VK_CANCEL
Return "%VK_CANCEL "
Case %VK_XBUTTON1
Return "%VK_XBUTTON1 "
Case %VK_XBUTTON2
Return "%VK_XBUTTON2 "
Case %VK_BACK
Return "%VK_BACK "
Case %VK_TAB
Return "%VK_TAB "
Case %VK_LINEFEED
Return "%VK_LINEFEED "
Case %VK_CLEAR
Return "%VK_CLEAR "
Case %VK_PAUSE
Case %VK_CAPITAL
Return "%VK_CAPITAL "
Case %VK_KANA
Return "%VK_KANA "
Case %VK_HANGUL
Return "%VK_HANGUL "
Case %VK_JUNJA
Return "%VK_JUNJA "
Case %VK_FINAL
Return "%VK_FINAL "
Case %VK_HANJA
Return "%VK_HANJA "
Case %VK_KANJI
Return "%VK_KANJI "
Case %VK_ESCAPE
Return "%VK_ESCAPE "
Case %VK_CONVERT
Return "%VK_CONVERT "
Case %VK_NONCONVERT
Return "%VK_NONCONVERT "
Case %VK_ACCEPT
Return "%VK_ACCEPT "
Case %VK_MODECHANGE
Return "%VK_MODECHANGE "
Case %VK_PRIOR
Return "%VK_PRIOR "
Case %VK_NEXT
Return "%VK_NEXT "
Case %VK_SELECT
Return "%VK_SELECT "
Case %VK_PRINT
Return "%VK_PRINT "
Case %VK_EXECUTE
Return "%VK_EXECUTE "
Case %VK_SNAPSHOT
Return "%VK_SNAPSHOT "
Case %VK_INSERT
Return "%VK_INSERT "
Case %VK_DELETE
Return "%VK_DELETE "
Case %VK_HELP
Return "%VK_HELP "
Case %VK_LWIN
Return "%VK_LWIN "
Case %VK_RWIN
Return "%VK_RWIN "
Case %VK_APPS
Return "%VK_APPS "
Case %VK_SLEEP
Return "%VK_SLEEP "
Case %VK_NUMPAD0
Return "%VK_NUMPAD0 "
Case %VK_NUMPAD1
Return "%VK_NUMPAD1 "
Case %VK_NUMPAD2
Return "%VK_NUMPAD2 "
Case %VK_NUMPAD3
Return "%VK_NUMPAD3 "
Case %VK_NUMPAD4
Return "%VK_NUMPAD4 "
Case %VK_NUMPAD5
Return "%VK_NUMPAD5 "
Case %VK_NUMPAD6
Return "%VK_NUMPAD6 "
Case %VK_NUMPAD7
Return "%VK_NUMPAD7 "
Case %VK_NUMPAD8
Return "%VK_NUMPAD8 "
Case %VK_NUMPAD9
Return "%VK_NUMPAD9 "
Case %VK_MULTIPLY
Return "%VK_MULTIPLY "
Case %VK_ADD
Return "%VK_ADD "
Case %VK_SEPARATOR
Return "%VK_SEPARATOR "
Case %VK_SUBTRACT
Return "%VK_SUBTRACT "
Case %VK_DECIMAL
Return "%VK_DECIMAL "
Case %VK_DIVIDE
Return "%VK_DIVIDE "
Case %VK_F1
Return "%VK_F1 "
Case %VK_F2
Return "%VK_F2 "
Case %VK_F3
Return "%VK_F3 "
Case %VK_F4
Return "%VK_F4 "
Case %VK_F5
Return "%VK_F5 "
Case %VK_F6
Return "%VK_F6 "
Case %VK_F7
Return "%VK_F7 "
Case %VK_F8
Return "%VK_F8 "
Case %VK_F9
Return "%VK_F9 "
Case %VK_F10
Return "%VK_F10 "
Case %VK_F11
Return "%VK_F11 "
Case %VK_F12
Return "%VK_F12 "
Case %VK_F13
Return "%VK_F13 "
Case %VK_F14
Return "%VK_F14 "
Case %VK_F15
Return "%VK_F15 "
Case %VK_F16
Return "%VK_F16 "
Case %VK_F17
Return "%VK_F17 "
Case %VK_F18
Return "%VK_F18 "
Case %VK_F19
Return "%VK_F19 "
Case %VK_F20
Return "%VK_F20 "
Case %VK_F21
Return "%VK_F21 "
Case %VK_F22
Return "%VK_F22 "
Case %VK_F23
Return "%VK_F23 "
Case %VK_F24
Return "%VK_F24 "
Case %VK_NUMLOCK
Return "%VK_NUMLOCK "
Case %VK_SCROLL
Return "%VK_SCROLL "
Case Else
Return Str$(vKey)
End Select
End Function
btw. it would be great if TBGL had an TBGL_isInput(hWnd)-function that returns also current states of the %VK-keys+buttons as in here.