Hi, I have an AZERTY laptop (standard in belgium) but it's quite annoying when I'm programming or typing LaTeX. For the characters []{} and \ I always need to press the ALT-GR key. I've seen that with a qwerty keyboard, this would be solved.

So my question is:
If I buy a qwerty keyboard, could ubuntu automatic change from azerty to qwerty when I plug in my keyboard and back to azerty when I unplug it? (so I need a script and a way to execute the script when (un)plugging the keyboard)
Or even better: could I type on the first keyboard as a azerty and meanwhile on the external keyboard as a qwerty?