I am using a custom keyboard layout and custom options not supported through the Settings > Keyboard GUI. My workaround to this is to create a script that sets the layout and its options with:
setxkbmap my_layout -option 'shift:both_capslock_cancel,grp:caps_switch,grp_led:scroll'
I have this script executed on session startup (added through the Settings -> Applications -> Startup GUI).
The issue I have is that when locking and unlocking the system, or when opening the Keyboard settings panel, the layout and options are reset to those set through the GUI.
Is there any way to prevent the layout from being reset every time?