I use this command: setxkbmap -option "lv3:caps_switch" to customize my keyboard shortcuts (home, end, left and right arrows).
Configuration resides in /usr/share/X11/xkb/symbols/us file. Everything works fine, except when I switch keyboard layout, those mappings made by setxkbmap, stop working and do not work again even if I switch back to US layout. I have to manually re-run setxkbmap -option "lv3:caps_switch" to make my mappings work again.
Is there a way to fix this? My Ubuntu version is 14.04