What if that language has its own `alternateLayout` and that ``alternateLayout` has its defined `basicLayoutKey`?

Besides, starting from the following line, we have some logic to replace basicLayoutKey, can we combine the logic you added to that?
https://github.com/Seinlin/gaia/blob/71c3fa6e28533527f77084fd20d3de78d4b37c5b/apps/keyboard/js/keyboard.js#L694