Getting MATLAB to accept input from external keypad

4 次查看(过去 30 天)
I am running MATLAB 2017a on a Macbook Pro 10.12.6 (Sierra). In addition to the keyboard on my laptop, I need MATLAB to take inputs from an external (USB connected) keypad. Even though input from the keypad seems to be functional (i.e., if I press '4', it will show up on MATLAB), MATLAB doesn't take it to be a valid argument. When I run KbDemo, input from the keypad are not being registered as responses. Can someone tell me how to switch the main keyboard input to the external keypad instead?
Thanks in advance

回答(1 个)

David Fink
David Fink 2017-9-28
Since MATLAB displays '4' when you type it on the external keypad, MATLAB does receive signals from the external keypad.
This implies that KbDemo is not handling the external keypad signals as you would expect. Different keys with the same output can be handled differently, so I suggest looking at the source code of KbDemo or asking its authors.

类别

Help CenterFile Exchange 中查找有关 Timing and presenting 2D and 3D stimuli 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by