When i send a key with a window applicationkatalon write in qwerty mode instead of azerty

When i send that WebUI.sendKeys(findTestObject(null), ‘1234’) katalon write that in the application : 'à_é
what is the good configuration to send azerty dashboard for send keys?
thanks for your help.

Hi there,

Thank you very much for your topic. Please note that it may take a little while before a member of our community or from Katalon team responds to you.

Thanks!

Hi @sjarrot-ext,

Thank you for sharing your issue. I would like to suggest the following steps to troubleshoot:

  1. Ensure that the Windows system where Katalon is running is set to the AZERTY keyboard layout.
  2. Go to Control Panel > Region and Language > Keyboards and Languages and ensure AZERTY is selected.
  3. You can switch layouts by pressing Alt + Shift or Windows + Space (depending on your settings).

Please try and let me know if it works

hi @sjarrot-ext

‘1234’ coming out as 'à_é is the classic sign that the keys are sent as virtual key codes, not characters. winappdriver presses the physical key for “1” and the app, running under an azerty layout, reads it as the unshifted & or à. switching the layout in the control panel does not help, it is the layout of the session where winappdriver runs that matters, and a mismatch in either direction gives you this.

two ways out. for text fields, use Windows.setText instead of sendKeys, it goes through the ui automation value pattern and never touches the keyboard, so the layout is irrelevant:

Windows.setText(findWindowsObject('App/txtCode'), '1234')

if the field really needs key presses, put the text on the clipboard and send ctrl+v:

import java.awt.Toolkit
import java.awt.datatransfer.StringSelection
Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new StringSelection('1234'), null)
Windows.sendKeys(findWindowsObject('App/txtCode'), Keys.chord(Keys.CONTROL, 'v'))

ctrl+v is the same physical key on azerty and qwerty, so that one is safe.