Your device can detect your keyboard as a QWERTY keyboard, either it is a Bluetooth® keyboard or a keyboard connected via a USB host cable.
To modify the settings, go to Settings (or) > Language and input then select your keyboard in the physical keyboard section.
In the displayed window, select Configure keyboard disposal then select French (Android keyboard) and check.
The same process works with all keyboards. If you have a physical keyboard QWERTZ, follow the same procedure to set up the German language.