# PTB doesn't recognize button box

**URL:** <https://psychtoolbox.discourse.group/t/ptb-doesnt-recognize-button-box/4770>\
**Category:** Hardware\
**Tags:** windows\
**Created:** [January 9, 2023, 4:50pm UTC](https://psychtoolbox.discourse.group/t/ptb-doesnt-recognize-button-box/4770 "2023-01-09T16:50:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kknight](https://avatars.discourse-cdn.com/v4/letter/k/8797f3/32.png) [@kknight](https://psychtoolbox.discourse.group/u/kknight)\
**Post date:** [January 9, 2023, 4:50pm UTC](https://psychtoolbox.discourse.group/t/ptb-doesnt-recognize-button-box/4770/1 "2023-01-09T16:50:51Z")

</div>

Hi all,

I’m having an issue getting PTB to recognize input from a button box. I have PTB 3.0.18, MATLAB 2022b, and Windows 10.

The button box can type letters into a word document, and into the MATLAB command window, but KbCheck doesn’t recognize it. EG, when I run “[keyDown, keySeconds, whichKey] = KbCheck;” nothing happens when a button is pushed.

What should I do?

---

<div class="post-metadata">

**Author:** ![xiangrui](https://avatars.discourse-cdn.com/v4/letter/x/ec9cab/32.png) [@xiangrui](https://psychtoolbox.discourse.group/u/xiangrui)\
**Post date:** [January 9, 2023, 6:31pm UTC](https://psychtoolbox.discourse.group/t/ptb-doesnt-recognize-button-box/4770/2 "2023-01-09T18:31:45Z")

</div>

If your button box behaves like a keyboard, KbCheck should pick up its events. Try following:

```
[keyDown, keySeconds, whichKey] = KbCheck(-1); % read event from all keyboards

```

---

<div class="post-metadata">

**Author:** ![kknight](https://avatars.discourse-cdn.com/v4/letter/k/8797f3/32.png) [@kknight](https://psychtoolbox.discourse.group/u/kknight)\
**Post date:** [January 10, 2023, 6:17am UTC](https://psychtoolbox.discourse.group/t/ptb-doesnt-recognize-button-box/4770/3 "2023-01-10T06:17:58Z")

</div>

Ah, sorry, I should have mentioned: I actually tried that, and it didn’t work.
