I'm currently developing my own macOS dotfiles.
I wasn't able to find a command that I can use to change the value of "Use the Caps Lock key to switch to and from U.S." I was trying to find it by using the defaults command.
I need a command to turn it on.

I found one useful trick. In order to find the
defaultskey for this setting, I opened terminal and wrote next command:Then I turned this setting off and executed:
And then after we saved 2 files, we can find the difference:
Here I was trying to find the key in the
defaultswhich was affected, and I found it.Here is a command for changing the value of "Use the Caps Lock key to switch to and from U.S.":