# Issues with KbCheck

**URL:** <https://psychtoolbox.discourse.group/t/issues-with-kbcheck/286>\
**Category:** Uncategorized\
**Created:** [October 29, 2013, 1:34pm UTC](https://psychtoolbox.discourse.group/t/issues-with-kbcheck/286 "2013-10-29T13:34:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jagreenwoodyh](https://avatars.discourse-cdn.com/v4/letter/j/e47c2d/32.png) [@jagreenwoodyh](https://psychtoolbox.discourse.group/u/jagreenwoodyh)\
**Post date:** [October 29, 2013, 1:34pm UTC](https://psychtoolbox.discourse.group/t/issues-with-kbcheck/286/1 "2013-10-29T13:34:24Z")

</div>

Hi,  
Long time user, first time writer.  
  
I'm setting up a new iMac and am having problems getting psychtoolbox to recognise the keyboard.  
  
e.g., a simple command like  

> \>\> escapeKey = KbName('q');

gives the error:  
----  
Error using KbName (line 876)  
Key name "q" not recognized. Maybe you need to add KbName('UnifyKeyNames'); to top of your script?  
----  
  
I definitely have UnifyKeyNames at the top of my script. In fact, running KbDemo gives the same error:  
---  
Error using KbName (line 876)  
Key name "ESCAPE" not recognized. Maybe you need to add KbName('UnifyKeyNames'); to top of your script?  
  
Error in KbDemo\>KbDemoPart1 (line 95)  
escapeKey = KbName('ESCAPE');  
  
Error in KbDemo (line 74)  
KbDemoPart1;  
----  
  
PsychHID and other commands work fine, so for instance if I run  

> \>\>pause(0.5); [touch,secs,keyCode]=PsychHID('KbCheck')

whilst holding down the 'q' key, I can see in keyCode that the 20th value is 1. But KbName itself fails to generate the labels for this as it used to on my old machines.  
  
Any ideas?  
  
I am running OS X 10.8.5 on a 27" 2012 iMac with the Intel Core, Nvidia GeForce GTX 675MX. Psychtoolbox is up-to-date (version 3.0.11).   
  
Potentially related: Psychtoolbox doesn't seem to recognise my OS, and gives warnings like this when my experiment is initiated:   
----  
I do not know your operating system, so I don't know where I should store  
Preferences.&nbsp; I'm putting them in the current working directory:  
----  
  
I've had java issues in the past, so checked that classpath.txt had the path to PsychJava and so on. If I do that, and run IsPsychJavaPathSet then it returns 1. Interestingly, once I run my code, this seems to be reset and IsPsychJavaPathSet returns 0. Perhaps there's a java issue - or perhaps I'm doing something daft. Any help appreciated!  
  
Here's the full info dump when I start my code:  
  
PTB-INFO: Connection to Psychtoolbox kernel support driver instance #0 (Revision 0) established.  
PTB-INFO: Connection to Psychtoolbox kernel support driver instance #1 (Revision 0) established.  
PTB-INFO: Disconnecting from kernel driver instance #1 for detected Intel GPU for safety reasons. setenv('PSYCH\_ALLOW\_DANGEROUS', '1') to override.  
  
PTB-INFO: This is Psychtoolbox-3 for Apple OS X, under Matlab 64-Bit (Version 3.0.11 - Build date: Sep 29 2013).  
PTB-INFO: Type 'PsychtoolboxVersion' for more detailed version information.  
PTB-INFO: Most parts of the Psychtoolbox distribution are licensed to you under terms of the MIT License, with  
PTB-INFO: some restrictions. See file 'License.txt' in the Psychtoolbox root folder for the exact licensing conditions.  
  
PTB-INFO: Deficient Apple OS/X 10.7 or later detected: Would use fragile CoreVideo timestamping as fallback,  
PTB-INFO: if beamposition timestamping would not work. Will try to use beamposition timestamping if possible.  
I do not know your operating system, so I don't know where I should store  
Preferences.&nbsp; I'm putting them in the current working directory:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /Users/john/Documents/MATLAB.  
  
PTB-INFO: You are using a multi-display setup (2 active displays):  
PTB-INFO: Please read 'help MultiDisplaySetups' for specific information on the Do's, Dont's,  
PTB-INFO: and possible causes of trouble and how to diagnose and resolve them.  
  
PTB-INFO: According to the operating system, some of your connected displays do not seem to   
PTB-INFO: be switched into mirror mode. For a discussion of mirror mode vs. non-mirror mode,  
PTB-INFO: please read 'help MirrorMode'.  
  
PTB-INFO: OpenGL-Renderer is NVIDIA Corporation :: NVIDIA GeForce GTX 675MX OpenGL Engine :: 2.1 NVIDIA-8.16.74 310.40.00.10f02  
PTB-INFO: Renderer has 1024 MB of VRAM and a maximum 996 MB of texture memory.  
PTB-INFO: VBL startline = 768 , VBL Endline = 822  
PTB-INFO: Measured monitor refresh interval from beamposition = 8.333858 ms [119.992446 Hz].  
PTB-INFO: Will use beamposition query for accurate Flip time stamping.  
PTB-INFO: Measured monitor refresh interval from VBLsync = 8.332168 ms [120.016785 Hz]. (50 valid samples taken, stddev=0.055940 ms.)  
PTB-INFO: Reported monitor refresh interval from operating system = 8.333333 ms [120.000000 Hz].  
PTB-INFO: Small deviations between reported values are normal and no reason to worry.  
PTB-INFO: Support for fast OffscreenWindows enabled.  
Snd(): Initializing PsychPortAudio driver for sound output.  
PTB-INFO: Using specially modified PortAudio engine, based on offical version: PortAudio V19-devel WITH-DIM
