Convert AutoHotkey Code into a Keyboard Maestro Macro

Hi,

I switched to Mac and I would like to migrate the following AHK code to Keyboard Maestro.

It works with the World of Warcraft game.

When I activate the caps lock it starts to press 0 every 100ms, and when I also press 1,2,3,4,q,e the buttons are repeated continuously as long as I keep them pressed.

Would be possible to obtain the same using Keyboard Maestro?

#IfWinActive, World of Warcraft
Loop  
{
    Sendinput {Blind}{0}
    sleep 100
}
return

*Capslock::
Suspend
Pause,,1
return

$1::
   Loop  
   {
    if not GetKeyState("1", "P")
      break
     Send 1 
     Sleep delay
    }
return

$2::
   Loop  
   {
    if not GetKeyState("2", "P")
      break
     Send 2 
     Sleep delay
    }
return

$3::
   Loop  
   {
    if not GetKeyState("3", "P")
      break
     Send 3 
     Sleep delay
    }
return

$4::
   Loop  
   {
    if not GetKeyState("4", "P")
      break
     Send 4 
     Sleep delay
    }
return

$q::
   Loop  
   {
    if not GetKeyState("q", "P")
      break
     Send q 
     Sleep delay
    }
return

$e::
   Loop  
   {
    if not GetKeyState("e", "P")
      break
     Send e 
     Sleep delay
    }
return

You need Karabiner-Elements´╝Ü

https://karabiner-elements.pqrs.org