Subject: bug#69321: AltGr not working with external keyboard on Android emacs-30.0.50-29-arm64-v8a

From: Po Lu <[email-masked]>
Date: Sat, 24 Feb 2024 10:03:27 +0800

Emilia Blåsten <[email-masked]> writes:

> The AltGr button does not seem to be recognized properly on Scandinavian
> external keyboard layouts, wether connected by USB or Bluetooth. This
> happens in Emacs version 30.0.50 on Android, filename
> emacs-30.0.50-29-arm64-v8a.apk from
>
> https://sourceforge.net/projects/android-ports-for-gnu-emacs/files/termux/
>
>
> Steps to reproduce:
>
> 1) Connect an external keyboard to the Android device
>
> 2) Set the layout to Scandinavian (e.g. in Android 11, settings ->
> system -> language and input -> physical keyboard -> name of the
> keyboard -> setup keyboard layouts -> remove all layouts except Finnish)
>
> 3) Open emacs with the "emacs -Q" option
>
> 4) in *scratch* press down the AltGr-key (right side of the space bar),
> then the 2-key, then release both, then press the a-key.
>
> Expected behaviour: you should have typed "@a"
>
> Actual behaviour: you typed "aa"
>
> The keyboard behaves like expected in Termux and Android text fields.
>
>
> Is there an option to fix this already, or is this a bug?

It's a bug which I've just fixed.  Prebuilts should be available soon.
Thanks.