# Input Text with Azerty Keyboard

**URL:** <https://discourse.psychopy.org/t/input-text-with-azerty-keyboard/13900>\
**Category:** Online experiments\
**Created:** [June 2, 2020, 7:18pm UTC](https://discourse.psychopy.org/t/input-text-with-azerty-keyboard/13900 "2020-06-02T19:18:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aelreym](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@aelreym](https://discourse.psychopy.org/u/aelreym)\
**Post date:** [June 2, 2020, 7:18pm UTC](https://discourse.psychopy.org/t/input-text-with-azerty-keyboard/13900/1 "2020-06-02T19:18:56Z")

</div>

URL of experiment: [https://run.pavlovia.org/aelreym/concurrent\_schedule\_task/html](https://run.pavlovia.org/aelreym/concurrent_schedule_task/html)

Description of the problem:  
I am trying to add a question where the participants have to type a few words to answer it. I have used the textInput Demo on Pavlovia which is very useful. The problem is that I will run my experiment in France where most people have the azerty layout, the responses typed are based on the qwerty layout. Is there a way to recognise the keyboard and to adapt the keyboard responses according to it? Or just to set the Azerty layout in general?

Thanks in advance for your help.

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [June 2, 2020, 9:51pm UTC](https://discourse.psychopy.org/t/input-text-with-azerty-keyboard/13900/2 "2020-06-02T21:51:42Z")

</div>

Do you need to set a layout? I can see that there are issues with accents but pressing the A key should send and A no matter where the key is on the keyboard.

---

<div class="post-metadata">

**Author:** ![aelreym](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@aelreym](https://discourse.psychopy.org/u/aelreym)\
**Post date:** [June 3, 2020, 3:17pm UTC](https://discourse.psychopy.org/t/input-text-with-azerty-keyboard/13900/3 "2020-06-03T15:17:34Z")

</div>

I don’t think it does. Example: I have a Qwertz keyboard and if I type a z it shows me y  
I haven’t thought about the accents but this would also be an issue.

---

<div class="post-metadata">

**Author:** ![obemar](https://avatars.discourse-cdn.com/v4/letter/o/839c29/32.png) [@obemar](https://discourse.psychopy.org/u/obemar)\
**Post date:** [June 9, 2020, 2:06pm UTC](https://discourse.psychopy.org/t/input-text-with-azerty-keyboard/13900/4 "2020-06-09T14:06:33Z")

</div>

My participants made me aware of that issue too. Luckily they figured it out on their own that z and y simply were interchanged (on our qwertz keyboard).

I tried adding  
.  
.  
.  
} else if (textAdd === ‘y’) {  
textAdd = ‘z’;  
.  
.  
.

and vice versa in JS Code but since textAdd is at some point always z and y, Pavlovia returns nothing on screen. (It works fine if I enter either y-\>z or z-\>y)  
I think I’ll leave the settings as they are. Z and Y aren’t too common in my language and participants were able to figure it out (this is also why I won’t bother with a dictionary for JS).

But an easy solution would be nice.
