I recently learned about
setxkbmap to switch keyboard layouts, and I have the following line in my
~/.i3/config file to be able to change layouts using
Left Alt + Left Shift
exec setxkbmap -layout us,ir -option 'grp:lalt_lshift_toggle'
However, I noticed something very inconvenient! I use a shortcut in my terminal that's set to
Alt + Shift + w (more specifically it's for
tmux and I have
bind-key -n M-W new-window ...
So, when I want to press
Alt + Shift + w to use my
tmux shortcut, the one set for
xkeyboard-config is taking over and changing my keyboard layout, and because my other layout doesn't use English alphabet, it prevents me from using my shortcut.
So, I was wondering if there's a way to "force" the keyboard layout to change only when I press
Alt + Shift and configure it so that it doesn't interfere with shortcuts that are somehow a "superset" of the configured key combination?