Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Keypad Entry
#11
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.

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.
Reply


Messages In This Thread
Keypad Entry - by eoredson - 01-07-2023, 05:33 AM
RE: Keypad Entry - by mnrvovrfc - 01-07-2023, 06:22 AM
RE: Keypad Entry - by eoredson - 01-08-2023, 10:55 PM
RE: Keypad Entry - by bplus - 01-09-2023, 02:27 AM
RE: Keypad Entry - by SMcNeill - 01-09-2023, 03:05 AM
RE: Keypad Entry - by JRace - 01-09-2023, 03:37 AM
RE: Keypad Entry - by eoredson - 01-09-2023, 03:48 AM
RE: Keypad Entry - by JRace - 01-09-2023, 04:04 AM
RE: Keypad Entry - by mnrvovrfc - 01-09-2023, 03:54 AM
RE: Keypad Entry - by TerryRitchie - 01-09-2023, 04:08 AM
RE: Keypad Entry - by SMcNeill - 01-09-2023, 04:10 AM
RE: Keypad Entry - by SMcNeill - 01-09-2023, 04:11 AM
RE: Keypad Entry - by JRace - 01-09-2023, 04:17 AM
RE: Keypad Entry - by SMcNeill - 01-09-2023, 04:20 AM
RE: Keypad Entry - by eoredson - 01-09-2023, 04:18 AM
RE: Keypad Entry - by SMcNeill - 01-09-2023, 04:26 AM
RE: Keypad Entry - by eoredson - 01-09-2023, 04:38 AM
RE: Keypad Entry - by SMcNeill - 01-09-2023, 04:53 AM



Users browsing this thread: 3 Guest(s)