01-09-2023, 04:10 AM
As I mentioned previous, it's an underlying GLUT issue. Try and hold down CTRL and press ANY of the number keys.... You won't get a keydown or keyup value for any of them with _KEYHIT. We're aware of it, an issue is in the repo concerning it, and when someone gets a chance, they'll work into seeing what we can do about it. (It may require removing glut completely and swapping over to something like GLFW instead. Who knows at this point yet, what the final fix might be?)
Option 1 is to use the windows commands directly to get their keycodes.
Option 2 is to make use of my KeyHit library which remaps these windows codes into the same values that we're used to seeing with _KEYHIT and _KEYDOWN.
Option 3 is to just not use those keys until someone can finally get a fix in for this longstanding issue.
Option 1 is to use the windows commands directly to get their keycodes.
Code: (Select All)
$If WIN Then
Declare Library 'function is already used by QB64 so "User32" is not required
Function GetKeyState% (ByVal vkey As Long)
Function GetAsyncKeyState% (ByVal vkey As Long)
End Declare
$End If
Do
Cls
For i = 1 To 254
If GetAsyncKeyState(i) And &H8000 Then Print "Keycode ="; i
Next
_Delay .25
_Display
Loop
Option 2 is to make use of my KeyHit library which remaps these windows codes into the same values that we're used to seeing with _KEYHIT and _KEYDOWN.
Option 3 is to just not use those keys until someone can finally get a fix in for this longstanding issue.