Created attachment 114606 [details]
quick dirty hack
Whenever I use xcape or xdotool to simulate a keypress, my layout gets reset to English. Worse, the associated LED doesn't switch and goes out of sync.
I was able to determine that this is because the virtual XTest keyboard has only one group, and so somewhere at the end of XkbHandleActions() group number gets checked for overflow and is reset to zero.
I've attached a quick hack that copies group count from real keyboard to Xtest one, but this is by no means intended to be a permanent solution.
I have xorg-server 1.17.1. Bug 16145 also seems relevant.
-- GitLab Migration Automatic Message --
This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/xserver/issues/589.