KbCheck not working with macOS
이전 댓글 표시
KbCheck does not work for me on my Mac. I've accepted input monitor from setting but it still does not work.
Could you give me any suggestions? Thank you.
I'm using following versions for each applications;
macOS 11.3.1
matlab 2021a
psychtoolbox 3.0.17
My command window is like this;
>> KbCheck
PsychHID-ERROR: During PsychHID invocation: macOS is preventing access to HID input devices like keyboard, keypad and mouse!
PsychHID-ERROR: This is because permission for 'Input Monitoring' is denied to Matlab 64-Bit, or to Terminal.app, if you started Matlab 64-Bit from a Terminal.
PsychHID-ERROR: Please rectify this manually now:
PsychHID-ERROR:
PsychHID-ERROR: 1. Quit Matlab 64-Bit, and also Terminal if it was used to launch Matlab 64-Bit.
PsychHID-ERROR: 2. Open 'System Preferences', then go to the 'Security & Privacy' control panel.
PsychHID-ERROR: 3. Select the 'Privacy' tab, and then in the list on the left, the item 'Input Monitoring'.
PsychHID-ERROR: 4. Make sure that Matlab 64-Bit, or similar, or maybe Terminal instead, is listed in the list on the right.
PsychHID-ERROR: E.g., names could be 'Terminal' or 'Octave' something, or 'MATLAB_R2020b.app' or similar for Matlab.
PsychHID-ERROR: 5. Make sure that the checkbox next to the name of the item is checked.
PsychHID-ERROR: 6. Restart Matlab 64-Bit.
PsychHID-ERROR: 7. Execute the 'KbCheck' command as a simple test, which should hopefully work now without errors.
PsychHID-ERROR: 8. If it doesn't work, retry the procedure - rinse, wash, repeat.
PsychHID-ERROR: 9. If it works without errors, retry if your own scripts or our demos now work again.
PsychHID-ERROR: 10. If none of this works, you may be able to buy paid priority support from us: 'help PsychPaidSupportAndServices'.
Error in function : Usage error
PsychHID-CRITICAL: PsychHID disabled due to macOS security restrictions! Emergency shutdown! 'clear all' or restart your application.
PTB-CRITICAL: Recursion stack underflow in module PsychHID! Brace for impact!
Error using PsychHID
Usage:
(null)
Error in KbCheck (line 182)
d = PsychHID('Devices');
댓글 수: 1
HDJ
2021년 5월 27일
Can somone answer this please? I am having the same error
답변 (2개)
Kohei Miyata
2021년 6월 14일
7 개 추천
I got the same problem but solved it by removing MATLAB from 'Input Monitoring' and adding it again.
Hope this helps!
댓글 수: 6
Alfredo Spagna
2021년 6월 17일
would you mind giving us a little more info about how did you do it?
Kohei Miyata
2021년 7월 7일
Follow the error code instruction 1-3.
>PsychHID-ERROR: 1. Quit Matlab 64-Bit, and also Terminal if it was used to launch Matlab 64-Bit.
>PsychHID-ERROR: 2. Open 'System Preferences', then go to the 'Security & Privacy' control panel.
>PsychHID-ERROR: 3. Select the 'Privacy' tab, and then in the list on the left, the item 'Input Monitoring'.
Remove MATLAB from the list on the right by clicking '-' button.
Add MATLAB again by clicking '+' button.
Check the box next to MATLAB.
Follow the error code instruction 5-7.
>PsychHID-ERROR: 5. Make sure that the checkbox next to the name of the item is checked.
>PsychHID-ERROR: 6. Restart Matlab 64-Bit.
>PsychHID-ERROR: 7. Execute the 'KbCheck' command as a simple test, which should hopefully work now without errors.
This worked for me.
macOS BigSur 11.4, MATLAB 2020a, psychtoolbox 3.0.17
尚 马
2021년 7월 15일
Thanks for your answer, this worked for me too!
Lukasz Grzeczkowski
2021년 10월 14일
Same here, it worked...thanks!
bianca baltaretu
2022년 4월 6일
worked for me, too! big save, thx!
spongeymongey
2022년 5월 13일
This worked for me too, thank you! :)
Fintan Nagle
2023년 10월 25일
0 개 추천
My Psychtoolbox was only responding to the Esc key on the touch bar, none of the keyboard keys.
I had to use
GetKeyboardIndices()
to determine that the keyboard was index 12, then pass 12 to KBCheck to tell it which keyboard to check.
카테고리
도움말 센터 및 File 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!