whoa, that's unfortunate.
I would like to reproduce it, so could you please specify the exact type of azerty you're using. Is it french, arabic ore something else? ( System prefences -> keyboard -> input sources).
Also, assuming you're using multiple layouts/languages, does it work when you switch keyboard layout to english?