I want to create a bash script that adds the "French (Canada)" keyboard layout. In addition, I would like to set Alt+Shift as the keys used to change layout.
setxkbmap to change the keyboard layout. For the "French (Canada)" layout, it's
setxkbmap fr-legacy (I find it with
cat /usr/share/X11/xkb/rules/base.lst | grep fr)
So you can put that in a bash script.
And to add a shortcut, you can add it in Keyboard → Shortcut (in the System configuration board).