I have been struggling with the following problem for years now. I have never been able to solve it, and I adopted several workarounds to keep being able to work. However now I can't stand it anymore, and I really would like to find a solution once and for all.
Here's the thing. I work on a MacBookPro with an AZERTY keyboard, but most of the time I plug to it a QWERTY Mac keyboard.