Getting MATLAB to accept input from external keypad

조회 수: 4 (최근 30일)
Ran Xu
Ran Xu 2017년 9월 25일
댓글: Walter Roberson 2017년 9월 28일
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