Detect azerty and qwertz

Addresses #2462.