scrcpy icon indicating copy to clipboard operation
scrcpy copied to clipboard

Arabic typing not working through scrcpy input (English works)

Open eslam-khalifa opened this issue 6 months ago • 2 comments

Description


I'm trying to type in Arabic using scrcpy, but the input only appears in English on the Android device. I switched the keyboard language on my PC to Arabic and typed, but on the phone, only English characters appear. I tested with different keyboards and Android devices, but I got the same result. Arabic input doesn’t appear at all, or gets replaced with English letters. I tried the command --keyboard=uhid and it still doesn't work.

Steps to reproduce


  1. Start scrcpy normally (I use USB)
  2. Switch PC keyboard to Arabic (e.g., Windows + Space)
  3. Focus a text field on the Android device (e.g., WhatsApp or a browser)
  4. Start typing Arabic

Expected behavior


Arabic text should appear correctly on the Android device.

Actual behavior


Only English characters appear, even when the Arabic keyboard is active.

System details


  • OS: Microsoft Windows 11 Pro
  • scrcpy version: 3.2
  • Android version: Android 12
  • Device model: Xiaomi Mi Note 10 Lite
  • Keyboard used: Built-in laptop keyboard (with Arabic layout enabled on Windows)

Additional context


Not sure if Arabic is supposed to be supported, but I couldn't find any clear mention of this in the documentation. If it's not supported, consider this a feature request.

Thanks for this great tool!

eslam-khalifa avatar Jun 08 '25 12:06 eslam-khalifa

I tried the command --keyboard=uhid and it still doesn't work.

On the first time, you must select the keyboard layout for UHID. Read: https://github.com/Genymobile/scrcpy/blob/master/doc/keyboard.md#physical-keyboard-simulation

rom1v avatar Jun 08 '25 14:06 rom1v

Thanks again for helping me set up Arabic input with UHID!

One remaining issue: when I enable multiple keyboard layouts (e.g. English and Arabic), scrcpy seems to always use the first layout, ignoring any switches (Shift+Space) I make.

This happens even though the PC keyboard layout changes. Android maintains the first layout only, suggesting the physical HID keyboard isn't re-initialized on layout switch.

Happy to help test any solution. Thanks for the awesome tool! :)

eslam-khalifa avatar Jun 08 '25 15:06 eslam-khalifa

The same issue here, Scrcpy is using the first layout only, ignoring any windows switches

msalah-kw avatar Jun 30 '25 17:06 msalah-kw

Once you enabled UHID, you must configure the layout on the Android device: https://github.com/Genymobile/scrcpy/blob/master/doc/keyboard.md#physical-keyboard-simulation

rom1v avatar Jun 30 '25 17:06 rom1v