As a programmer, this is a very frustrating issue for me as well. Punctuation, brackets and other such characters are located in very different positions on sv_SE compared to en_US.
My keyboard layout always changes to en_US when GNOME Shell is restarted. Never on the initial startup though. The following command solves the issue temporarily for me: gsettings set org.gnome.desktop.input-sources current 0 -- You received this bug notification because you are a member of Ubuntu Desktop Bugs, which is subscribed to gnome-settings-daemon in Ubuntu. https://bugs.launchpad.net/bugs/1246272 Title: Keyboard layout changing randomly To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/1246272/+subscriptions -- desktop-bugs mailing list desktop-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/desktop-bugs