No Detection of Key Presses on the Keyboard

Hi,

Software Environment:
Matlab: R2022a
Psychophysics Toolbox: 3.0.19.13

I am using KbQueueCreate and other associated functions. I have also used KbQueueRelease function before creating any instance of KbQueueCreate function. I have also provided keyboardID along with all the functions. However, when I am pressing the “space” button, the KbQueueCheck function is returning 0. In fact, no matter what button I press, I always get 0 in return. Basically, it means no key has been pressed.
I have also run the keyboard detection program. It is detecting the keyboard. Output of the key detection program is as follows:
Device ID 1:
Product: USB Keyboard
Manufacturer: Logitech
Usage: TBD
Vendor ID: 1133
Product ID: 49949
Serial Number:
Location ID: 5556973213214371840

Device ID 2:
Product: HP 320M USB Optical Mouse
Manufacturer: PixArt
Usage: TBD
Vendor ID: 1121
Product ID: 16705
Serial Number:
Location ID: 5556973213214371840

Device ID 3:
Product: USB Keyboard
Manufacturer: Logitech
Usage: TBD
Vendor ID: 1133
Product ID: 49949
Serial Number:
Location ID: 5556973213214371840

Device ID 4:
Product: USB Keyboard
Manufacturer: Logitech
Usage: TBD
Vendor ID: 1133
Product ID: 49949
Serial Number:
Location ID: 5556973213214371840

Device ID 5:
Product: USB Keyboard
Manufacturer: Logitech
Usage: TBD
Vendor ID: 1133
Product ID: 49949
Serial Number:
Location ID: 5556973213214371840

What operating system are you using?

I am using Windows 10.

Does KbQueueDemo work? How do you find the keyboardID for your keyboard? Via GetKeyboardIndices as recommended?