# New EyelinkToolbox 2 version

**URL:** <https://psychtoolbox.discourse.group/t/new-eyelinktoolbox-2-version/1729>\
**Category:** Uncategorized\
**Created:** [November 3, 2006, 9:43am UTC](https://psychtoolbox.discourse.group/t/new-eyelinktoolbox-2-version/1729 "2006-11-03T09:43:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![franswcornelissen](https://avatars.discourse-cdn.com/v4/letter/f/df705f/32.png) [@franswcornelissen](https://psychtoolbox.discourse.group/u/franswcornelissen)\
**Post date:** [November 3, 2006, 9:43am UTC](https://psychtoolbox.discourse.group/t/new-eyelinktoolbox-2-version/1729/1 "2006-11-03T09:43:33Z")

</div>

Dear all,  
  
The beta version (rev 533) of the PsychToolbox contains a new version of the   
EyelinkToolbox for Mac OSX and Windows (latter thanks to Mario K.). Both are based on   
exactly the same code. All issues reported on the forum have been dealt with, as far as we   
know:  
  
\*Eyelink('command') and Eyelink('startrecording') now should return status  
\*"EyelinkInitDefaults.m" no longer tests for a Mac before assigning key values.  
\*"EyelinkInitDefaults.m" now calls KbName('UnifyKeyNames') to solve issues with key   
codes.  
\*Commented-out the AssertOSX at the top of EyelinkExample.m  
\*Added the functions Eyelink('getnextdatatype') and Eyelink('getfloatdata')  
\*Added experimental function [sample, raw] = Eyelink('NewestFloatSampleRaw'). Should   
work as sample = Eyelink('NewestFloatSample') but offers option of specifying a raw   
parameter in which case it also returns the raw part of data sample if available (only   
available with EL1000)" Note that this latter function isn't properly tested because it only   
works with EL1000, which we don't have.  
EyelinkToolboxTest in EyelinkTests does quick test of functioning of nearly all functions.  
  
On our wishlist is still the ability to show the subject's eye during calibration on the display   
computer (i.e. within matlab/psychtoolbox window), but this is a somewhat less trivial   
issue to solve.  
  
Happy tracking!  
And please report any new issues on the forum.  
  
Frans Cornelissen

---

<div class="post-metadata">

**Author:** ![adammorrissirrommada](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@adammorrissirrommada](https://psychtoolbox.discourse.group/u/adammorrissirrommada)\
**Post date:** [November 5, 2006, 1:12am UTC](https://psychtoolbox.discourse.group/t/new-eyelinktoolbox-2-version/1729/2 "2006-11-05T01:12:39Z")

</div>

Dear Frans,  
  
I just updated to the new ETB and found that EyelinkInitDefaults no longer works. It seems that you have created a separate copy of the code within the m-file and added a "\<\<\<\<\<\<\< .mine" header, which causes a MATLAB error. There are similar headers placed throughout the file that also need to be removed. Easy to fix, of course, but just letting you know! Also, you will need to add KbName('UnifyKeyNames') to the top and change some of the key names. For example, at present you assign KbName('esc') to el.quitkey, which I think is a recognised key on Windows but not Macs (is this true?). After calling UnifyKeyNames, Windows recognises 'escape' but not 'esc', so for universal code, this line should be changed to KbName('escape').  
  
I think this is how the key assignment section should read after calling KbName('UnifyKeyNames'):  
  
% keyCodes for EyelinkGetKey  
%if strcmp(el.computer,'MAC')==1 % OSX  
 &nbsp;&nbsp;&nbsp; el.uparrow=KbName('UpArrow');  
&nbsp;&nbsp;&nbsp; el.downarrow=KbName('DownArrow');  
&nbsp;&nbsp;&nbsp; el.rightarrow=KbName('RightArrow');  
&nbsp;&nbsp;&nbsp; el.leftarrow=KbName('LeftArrow');  
&nbsp;&nbsp;&nbsp; el.pageup=KbName( 'PageUp');  
&nbsp;&nbsp;&nbsp; el.pagedown=KbName('PageDown');  
&nbsp;&nbsp;&nbsp; el.enter=KbName( 'Return');  
&nbsp;&nbsp;&nbsp; el.return=KbName( 'Return');  
&nbsp;&nbsp;&nbsp; el.escape=KbName( 'ESCAPE');  
&nbsp;&nbsp;&nbsp; el.space=KbName( 'space');  
&nbsp;&nbsp;&nbsp; el.backspace=KbName('BackSpace'); % is this delete backspace?  
 &nbsp;&nbsp;&nbsp; el.keysCached=1;  
 %else  
%&nbsp;&nbsp;&nbsp; el.keysCached=0;  
%end  
  
 Can someone running ETB on a Mac confirm that these assignments work?  
  
Also, it would be great if you could add code to the bottom of EyelinkTargetModeDisplay.m that ensures control is not returned to EyelinkDoTrackerSetup.m until all keys are released.  
  
Regards,  
  
Adam Morris  
  
At 08:43 PM 3/11/2006, you wrote:  
  

> > Dear all,  
> >   
> > The beta version (rev 533) of the PsychToolbox contains a new version of the   
> > EyelinkToolbox for Mac OSX and Windows (latter thanks to Mario K.). Both are based on   
> > exactly the same code. All issues reported on the forum have been dealt with, as far as we   
> > know:  
> >   
> > \*Eyelink('command') and Eyelink('startrecording') now should return status  
> > \*"EyelinkInitDefaults.m" no longer tests for a Mac before assigning key values.  
> > \*"EyelinkInitDefaults.m" now calls KbName('UnifyKeyNames') to solve issues with key   
> > codes.  
> > \*Commented-out the AssertOSX at the top of EyelinkExample.m  
> > \*Added the functions Eyelink('getnextdatatype') and Eyelink('getfloatdata')  
> > \*Added experimental function [sample, raw] = Eyelink('NewestFloatSampleRaw'). Should   
> > work as sample = Eyelink('NewestFloatSample') but offers option of specifying a raw   
> > parameter in which case it also returns the raw part of data sample if available (only   
> > available with EL1000)" Note that this latter function isn't properly tested because it only   
> > works with EL1000, which we don't have.  
> > EyelinkToolboxTest in EyelinkTests does quick test of functioning of nearly all functions.  
> >   
> > On our wishlist is still the ability to show the subject's eye during calibration on the display   
> > computer (i.e. within matlab/psychtoolbox window), but this is a somewhat less trivial   
> > issue to solve.  
> >   
> > Happy tracking!  
> > And please report any new issues on the forum.  
> >   
> > Frans Cornelissen
> 
>  
> 
> Adam  
>   
> **School of Behavioural Science / National Neuroscience Facility**  
> University of Melbourne  
> Victoria, Australia,&nbsp; 3010  
> Tel. +61 3 8344 1904
