How add Caps Lock to change input / layout?

How can I use capslock to change the keyboard layout? its so simple in mac and Linux mint but here is impossible

Caps Lock does not change the keyboard layout.
It simply switches input to all Caps - as if you hold down Shift when typing.

What is your actual issue?
What is it that you want to do
and think you can achieve with Caps Lock?

I want to change the layout so fast without changing my hand’s position
I just used to in macOS, Linux mint and did this with AutoHotkey in windows

then you’ll likely have to set up a keyboard shortcut to execute the function that you want
and bind that action to the caps lock key

If it is working (and even out of the box, apparently, in Linux Mint)
why not have a look at the configurations they did to make this work?

I don’t have Mint and cannot look.

There definitely is a keyboard shortcut to do this - but it might not be “just Caps lock” - or it might not be defined at all and you need to set it up yourself to do what you like it to do.

… between what layout and what other layout?

Persian and English

and also in Manjaro we have a 4-second delay for showing the change layout animation

I have no idea what that might mean.

… you want a keyboard shortcut to switch between Persian and English
and you want it to be the Caps Lock key

and it isn’t defined already
and you do not know how to do that

… I cannot help

but someone else surely can

What did your comparison with Linux Mint reveal?
they apparently assigned the Caps Lock to “change layout” …

It is easy to achieve using the GUI:

  1. Go to "System Settings"
  2. type "Keyboard" into the search input
  3. Go to "Input Devices""Keyboard"
  4. Open the "Advanced" tab
  5. Drop the "Switching to another layout" param down and select "Caps Lock"
  6. Apply your changes

After doing all these steps you should be able to switch languages by pressing Caps Lock. The default behavior of Caps Lock can be called by pressing Caps Lock and Shift at the same time.

Enjoy Manjaro =)