Axe-crude 2-minute solution:
In project settings in input mapping tab (tabs are on the top and greyed out for some reason) one can just make "Q" and "A" correspond to the same action "ui_left".
If controls are made using Input class and its action-related functions it will be effective.
That would result in one additional redundant key for "ui_left" but since the keyboard is underused anyway it's no biggie.
Less crude solution is to use OS.get_latin_keyboard_variant() which returns "QWERTY", "AZERTY" or whatever else.