Keyboard Scan Codes on Mac


Author
Message
Charlene_W
Charlene_W
Associate Member (52 reputation)Associate Member (52 reputation)Associate Member (52 reputation)Associate Member (52 reputation)Associate Member (52 reputation)Associate Member (52 reputation)Associate Member (52 reputation)Associate Member (52 reputation)Associate Member (52 reputation)
Group: Awaiting Activation
Posts: 5, Visits: 9
Dave - 9/14/2020
Charlene_W - 9/14/2020
Dave - 9/11/2020
Charlene_W - 9/11/2020
Dave - 11/7/2013

Interesting -- I suppose this a Mac-specific bug then. Thanks for following up with the test results / additional details.


Hi Dave, 
I am experiencing a similar problem.
I have assigned a left response key to "A", which on the US QWERT keyboard corresponds to the scan code 30. When I test-run this, nothing is happening when I press "A". 
My right response key -- "L" which is 38, works perfectly.
I have also tried assigning my left response key to several other letters, and nothing worked either.

<values>
/responsekeyLEFT = 30
/responsekeyLEFT_label = "A"
/responsekeyRIGHT = 38
/responsekeyRIGHT_label = "L"

Any tips or suggestions?
Thank you in advance

You need to provide the actual code and clarify what Inquisit version etc, you are working with.

Hello Dave, 

I am using Insquisit 5 on a Mac, although I have tried the same script on a windows system using the same version of Inquisit and the problem is still here.

I am not sure what you meant by "actual code," but here's how the values are defined:

<values>
/responsekeyLEFT = 30
/responsekeyLEFT_label = "A"
/responsekeyRIGHT = 38
/responsekeyRIGHT_label = "L"

/fontsize_orientationprime = 5%
/fontsize_stims = 5%
/orientationprime_duration = 350
/testprime_duration = 300
/primetargetinterval = 0
/max_targetduration = 1750
/iti = 1000

/anticipatoryresponse = 100
/slowresponse = 1500
/reminderduration = 2000
</values>

Again, the "L" key is working fine but the "A" key is not responding. When I changed the left response key to a different letter by changing "30" to different scan codes, the problem persists. 

Let me know if you would need me to post the entire script, which would be quite long.

Thank you again!

The values are not useful in isolation; there is nothing wrong with them. More likely, there's a mistake somewhere in the <trial> elements that actually rely on those values. So please provide the full script, and please do not paste it into a post's body. Instead please use the attachment facilities provide by the forum:

Thanks for the tip! 
I don't know if you are planning on just looking at the script or actually running it, but if the latter, I will attach the photos used cued by this script as well. 
Attachments
experiment.iqx (221 views, 154.00 KB)
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
Charlene_W - 9/14/2020
Dave - 9/14/2020
Charlene_W - 9/14/2020
Dave - 9/11/2020
Charlene_W - 9/11/2020
Dave - 11/7/2013

Interesting -- I suppose this a Mac-specific bug then. Thanks for following up with the test results / additional details.


Hi Dave, 
I am experiencing a similar problem.
I have assigned a left response key to "A", which on the US QWERT keyboard corresponds to the scan code 30. When I test-run this, nothing is happening when I press "A". 
My right response key -- "L" which is 38, works perfectly.
I have also tried assigning my left response key to several other letters, and nothing worked either.

<values>
/responsekeyLEFT = 30
/responsekeyLEFT_label = "A"
/responsekeyRIGHT = 38
/responsekeyRIGHT_label = "L"

Any tips or suggestions?
Thank you in advance

You need to provide the actual code and clarify what Inquisit version etc, you are working with.

Hello Dave, 

I am using Insquisit 5 on a Mac, although I have tried the same script on a windows system using the same version of Inquisit and the problem is still here.

I am not sure what you meant by "actual code," but here's how the values are defined:

<values>
/responsekeyLEFT = 30
/responsekeyLEFT_label = "A"
/responsekeyRIGHT = 38
/responsekeyRIGHT_label = "L"

/fontsize_orientationprime = 5%
/fontsize_stims = 5%
/orientationprime_duration = 350
/testprime_duration = 300
/primetargetinterval = 0
/max_targetduration = 1750
/iti = 1000

/anticipatoryresponse = 100
/slowresponse = 1500
/reminderduration = 2000
</values>

Again, the "L" key is working fine but the "A" key is not responding. When I changed the left response key to a different letter by changing "30" to different scan codes, the problem persists. 

Let me know if you would need me to post the entire script, which would be quite long.

Thank you again!

The values are not useful in isolation; there is nothing wrong with them. More likely, there's a mistake somewhere in the <trial> elements that actually rely on those values. So please provide the full script, and please do not paste it into a post's body. Instead please use the attachment facilities provide by the forum:

Thanks for the tip! 
I don't know if you are planning on just looking at the script or actually running it, but if the latter, I will attach the photos used cued by this script as well. 

In this <block>

<block orientationCvH>
/trials = [1 = instructionsCvH; 2-33 = noreplace(orientationprime_heal, orientationprime_con)]
/onblockbegin = [values.con_responsekey = values.responsekeyRIGHT; values.con_responsekeylabel = values.responsekeyRIGHT_label; values.rightcategoryCvH = "contaminated"]
/onblockbegin = [values.heal_responsekey = values.responsekeyLEFT; values.heal_responsekeylabel = values.responsekeyLEFT_label; values.leftcategoryCvH = "healthy/clean"]
</block>

you set values.con_responsely and values.heal_responsekey.

The trials in that block, however, operate only on one of those values, values.con_responsekey.

<trial orientationprime_heal>
...
/isvalidresponse = [trial.orientationprime_heal.response == values.con_responsekey || trial.orientationprime_heal.response == values.vio_responsekey]
/iscorrectresponse = [trial.orientationprime_heal.response == values.vio_responsekey]
...
</trial>

<trial orientationprime_con>
...
/isvalidresponse = [trial.orientationprime_con.response == values.con_responsekey || trial.orientationprime_con.response == values.vio_responsekey]
/iscorrectresponse = [trial.orientationprime_con.response == values.con_responsekey]
...
</trial>

The other value those trials consider as response is values.vio_responsekey, which you're not setting in the block and which, per the script's initialization is set to the right response key. I.e. to the same key as values.con_responsekey.





GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search