USB Input - device not recognized as keyboard

I am hoping to use this USB button device as a simple keyboard or mouse input:
https://www.delcomproducts.com/productdetails.asp?PartNumber=706400

I am using MacOS Sierra (10.12.14) + Matlab 2015a + Psychtoolbox 3.0.14
The same problem exists in Windows 10 Enterprise + Matlab 2018b + Psychtoolbox 3.0.15

The device works in the operating system and matlab window as the specified type (e.g. I get the appropriate letter on the screen when pressing the button when configured as keyboard, or a mouse press when configured as mouse).
However, the device is NOT recognized as a keyboard (or mouse, when configured as such) by PsychHID(‘Devices’) and therefore not registering in my script using the Kb or Mouse functions.

According to the device manufacturer, the HID device is programmed to have multiple different “USB Usage” entries including keyboard but the device seen in psychtoolbox seems to be only the first “vendor specific” entry as follows:
usagePageValue: 65280
usageValue: 0
usageName: ‘Page: 0xff00, Usage: 0x0’
index: 2
transport: ‘USB’
vendorID: 4037
productID: 45184
version: 18
manufacturer: ‘Delcom Products Inc.’
product: ‘USB FS IO’
serialNumber: ‘’
locationID: 336592896
interfaceID: 0
totalElements: 588
features: 264
inputs: 319
outputs: 5
collections: 9
axes: 0
buttons: 0
hats: 0
sliders: 0
dials: 0
wheels: 0

Is there a way to force psychtoolbox to see more than one HID entry perhaps, so that I identify the device as the appropriate type and use the mouse or kb functions?

I suppose I should be able to use PsychHID tools, but I am not familiar with the usage and have had trouble finding any simple examples for how to collect a simple input.

Any are suggestions much appreciated.

First of all, PTB 3.0.14 and 3.0.15 are end of life and therefore unsupported. First you should upgrade to the latest PTB 3.0.16 beta.

You should use the functions GetKeyboardIndices() or GetMouseIndices() to enumerate keyboard/mouse(-like) devices. If that doesn’t work, which means the device is not presenting itself as a proper HID keyboard or mouse, the link to the product you posted mentions a setup utility that allows to configure these devices as keyboard/mic etc. Maybe try that and configure it only as a keyboard?

The device spec you posted from PsychHID(‘Devices’) is not defining any keyboard/mouse device, but some vendor specific device, so that would already violate the HID standard and cause trouble. Maybe that config tool allows you to make it into something that is more conformant to a HID keyboard.

Other than that, assuming you have the latest PTB 3.0.16 installed, provide the output of these:

Windows:

devs = PsychHID('Devices', 4)
[keyIsDown,secs, keyCode]= Screen('GetMouseHelper', -1)

macOS:

devs = PsychHID('Devices')
[keyIsDown,secs, keyCode]= PsychHID('KbCheck', -deviceIndex);

Replace the deviceIndex with the proper number for what you think is the kebyoard, in the above case it would be 2, because “index: 2” for that Delcom products thingy.

Your best shot on Windows would be to call KbCheck without any input arguments. Could be that it doesn’t register a button press if the manufacturer did something stupid like sending a key press event over USB, immediately followed by a key release event, instead of only sending the release event after the subject releases the button. That would still register in a normal window, but not via KbCheck if the “key down” interval is very short.

On Apples trainwreck we had to pile so many workarounds on top of workarounds to deal with macOS input systems shoddy design and bugs that i’m not of great hope we could deal with anything that doesn’t behave like a proper keyboard. Difficult enough to make those behave ok for low-level queries with precise timing.

However, if this device can’t expose itself as a proper keyboard then i’d say this is something for that manufacturer to deal with.