Setting up mouse triggers to pan screen in a game

Hi, I have a niche use case that I'm trying to leverage BTT for. There's a game on Steam, Coloring Pixels, that I want to put on my iPad with sidecar and play using just the Apple Pencil. Everything works, except that I need a way to pan the screen horizontally and vertically.
The normal shortcuts are either:

  • WSAD
  • Right click and move mouse

So I need a way to trigger those using only the mouse (pencil). What I've tried:

  • Screen edges trigger WSAD. This kind of works but is really hard to use effectively. Most of the time I end up scrolling too far.
  • Floating menu with WSAD buttons. I couldn't figure out how to get the buttons to repeat or stay held down, so this didn't work.
  • Left click becomes a right click depending on how long the click is held in one spot. Or the opposite - left click becomes right click if the mouse moves immediately. I don't know if there's a way to set this up without scripting.

I'd appreciate any help I can get. Thanks!