Automatic Keyboard Layout Switching

Okay. I’ve managed to get the HDMI working and connecting to a BT Keyboard (although my Logitech w/ trackpad connects, but doesn’t pair or work). The problem is that I have to remember what keys are assigned to the various buttons to get around with the keyboard. It would be nice to have a feature that would change the keyboard layout in Launcher and RetroPie when launching on Bluetooth and/or a bluetooth keyboard… Any ideas?

ps:
git pull to update the launcher

now the launcher has the pairing function on bluetooth, welcome to test it

after paring, bluetooth devices can be remembered by linux system,no need to connect again

My off-brand keyboard pairs just fine and is fully functional. The Logitech seems to pair and does connect, but the info data shows that it’s not paired and it doesn’t function at all.

My real problem is that I would like to change the key assignments when the keyboard connects. That way I could use, for example, s, z, a & w for the A, B, X & Y buttons when the keyboard connects, but revert back when the keyboard disconnects.