Android virtual keyboard app that support physical keyboard language and layout change Apparently on many Android phones on Android OS 7+ there is no option to change external physical keyboard language/layout without going into device settings.

Is there a good virtual keyboard, which also supports changing layout/language for the attached physical keyboard on wide range of devices? 

Solutions that I found: 


Dedicated keyboard app for typing with physical keyboard. Popular recommendation is https://play.google.com/store/apps/details?id=com.apedroid.hwkeyboardhelper&amp;hl=ru. There are other options like Logitech Keyboard Plus app on Google Play. This is inconvinient, as you have to switch between input method every time you plug the physical keyboard. 
Install two keyboards for every language you want to support. Assign proper layouts for them in the settings. Switch between keyboards with Command + Space. This is a kludge and inconvinience. 


A few additional points:


SwiftKey does not support this feature. Changing language with the globe icon does not affect what you type on physical keyboard at the moment of writing this question. See https://support.swiftkey.com/hc/en-us/articles/201591341-How-to-use-SwiftKey-with-physical-external-Bluetooth-keyboards-on-Android . Same with Google Keyboard at least on One Plus 3 and Xiaomi MI5 with latest OS updates. 
There are multiple threads suggesting to add several language in physical keyboard settings. However most of them are for Anrdoid 5-6, where keyboard layout switch with Ctrl-Space appeared to be standard feature in most ROMs. It appears that this is no longer the case.
The following software have independent physical keyboard layouts not tied to the OS layout in any way.

ruKeyboard software. It's a software+hardware keyboard initially made for Android smartphones with qwerty keyboard. It supports Android 2.3-9 and allows to add your own software and hardware layouts for different languages (you need to modify the XML files inside apk, but it's not that hard). It's abandoned and not open source, but still works fine. Software and physical keyboard layout switching is independent. You can configure your own switching combination on physical keyboard.

AnySoftKeyboard is what you can call a modern alternative to ruKeyboard. It's a software keyboard with support for physical keyboards. You can define your own layouts just as in ruKeyboard, by editing xml files inside the apk. Layout swithing is unified: if you switch the layout on software keyboard, it would switch on hardware keyboard as well. It's open source.