If you force the load of the .Xmodmap by adding the command 'xmodmap ~/.Xmodmap' in the Startup Applications, all is reverted if you suspend/resume or if you change the user and get back etc. So I managed to adapt some snippets I found, using the python dbus interface to reissue the command when resuming, changing the keyboard layout or changing sessions. It can be saved as /usr/local/bin/user-xmodmap- reload-hack (or other path/name) and then added to the Startup Applications.
I didn't test it very much and I don't have much code experience, so you are welcome to modify. ** Attachment added: "user-xmodmap-reload-hack" https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/1243642/+attachment/4183061/+files/user-xmodmap-reload-hack -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1243642 Title: .Xmodmap not automatically loaded on start To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/1243642/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs