Auto-Tap Key with Random Delay: Need help

hellooo. I am a newbie and trying to learn how to use it.

“Expressions’ is used by a language that is a bit foreign to me. So I would like to ask everyone how I can create a config like:

when I tap or hold the A key, when I release the A key, it automatically taps the D key and vice versa. I want to create a random delay when it taps the D key too, which means: it doesn’t automatically tap the D key immediately after I release the A key, there is a random delay for each time.
Same goes for the W and S keys.

Can anyone help me or guide me how to create a config that has such functionality?

Thank you very much.

Sorry, that just sounds like you want to cheat at some game.

Actually it’s not a cheat, my idea is similar to the SOCD or Rappy Snappy function of some keyboards on the market today but I upgraded it a bit to reduce the operations.

For SOCD or Rappy Snappy (last input priority) when you hold A, then press D, the computer skips A and only accepts D. I want to reduce the operation so that instead of having to press D, you just need to release the A key and it will automatically press D for us.