psychojs icon indicating copy to clipboard operation
psychojs copied to clipboard

Different values returned by getKeys on PsychoPy and PsychoJS

Open tpronk opened this issue 3 years ago • 2 comments

Implementations of getKeys are different between PsychoJS (returns keyboard entities) and PsychoPy (returns actual keys). Concretely this means the following. If you set your keyboard layout to german, there is an U-umlaut (ü) at the location of the left-bracket key ([). In PsychoPy, getKeys returns "ü", but PsychoJS returns "leftbracket".

Demo: https://gitlab.pavlovia.org/tpronk/e2e_map_key https://run.pavlovia.org/tpronk/e2e_map_key/

tpronk avatar Sep 14 '20 09:09 tpronk

I'm surprised about the getKeys from PsychoPy here. In general, we aim to return the name of the key not the character. I might need to check with you the code that you're using (because there are several forms of getKeys() calls depending on backend being used)

peircej avatar Sep 14 '20 11:09 peircej

Little follow-up: I verified this issue on my Win10 device on Chrome and Firefox. The new link to the experiment I use to test it is: https://run.pavlovia.org/tpronk/demo_map_key/

tpronk avatar Jul 08 '21 08:07 tpronk