@sven
The solution was to declare the existing french cosmo layout in the evdev.xml file. I added :
<variant>
<configItem>
<name>fr</name>
<shortDescription>fr</shortDescription>
<description>French (Cosmo Communicator)</description>
<languageList>
<iso639Id>fr</iso639Id>
</languageList>
</configItem>
</variant>
in the "planet" section as explained here : https://gitlab.com/ubports/community-ports/android9/planet-cosmocom/planet-cosmocom/-/issues/3
Then the Cosmo communicator layout appears in the variants of French in the physical keyboard menu of UT. Didn't touch to the layout file at all.
Thanks both of you for the tips. Works perfectly now.